diff --git a/README.md b/README.md index 018f59803e4e..8276531af786 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ This library supports the following Google Cloud Platform services with clients - [Cloud Bigtable](google-cloud-clients/google-cloud-bigtable) (Alpha) - [Cloud Compute](google-cloud-clients/google-cloud-compute) (Alpha) +- [Cloud Data Labeling](google-cloud-clients/google-cloud-datalabeling) (Alpha) - [Cloud Dataproc](google-cloud-clients/google-cloud-dataproc) (Alpha) - [Cloud DNS](google-cloud-clients/google-cloud-dns) (Alpha) - [Cloud OS Login](google-cloud-clients/google-cloud-os-login) (Alpha) diff --git a/google-api-grpc/grpc-google-cloud-datalabeling-v1beta1/pom.xml b/google-api-grpc/grpc-google-cloud-datalabeling-v1beta1/pom.xml new file mode 100644 index 000000000000..be4524512568 --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-datalabeling-v1beta1/pom.xml @@ -0,0 +1,31 @@ + + 4.0.0 + grpc-google-cloud-datalabeling-v1beta1 + 0.50.1-SNAPSHOT + grpc-google-cloud-datalabeling-v1beta1 + GRPC library for grpc-google-cloud-datalabeling-v1beta1 + + com.google.api.grpc + google-api-grpc + 0.50.1-SNAPSHOT + + + + io.grpc + grpc-stub + compile + + + io.grpc + grpc-protobuf + compile + + + com.google.api.grpc + proto-google-cloud-datalabeling-v1beta1 + compile + + + diff --git a/google-api-grpc/grpc-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceGrpc.java b/google-api-grpc/grpc-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceGrpc.java new file mode 100644 index 000000000000..24d82bb4994f --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceGrpc.java @@ -0,0 +1,3497 @@ +package com.google.cloud.datalabeling.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto") +public final class DataLabelingServiceGrpc { + + private DataLabelingServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.datalabeling.v1beta1.DataLabelingService"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateDatasetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset> + METHOD_CREATE_DATASET = getCreateDatasetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset> + getCreateDatasetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset> + getCreateDatasetMethod() { + return getCreateDatasetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset> + getCreateDatasetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset> + getCreateDatasetMethod; + if ((getCreateDatasetMethod = DataLabelingServiceGrpc.getCreateDatasetMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getCreateDatasetMethod = DataLabelingServiceGrpc.getCreateDatasetMethod) == null) { + DataLabelingServiceGrpc.getCreateDatasetMethod = + getCreateDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "CreateDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.Dataset.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("CreateDataset")) + .build(); + } + } + } + return getCreateDatasetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetDatasetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset> + METHOD_GET_DATASET = getGetDatasetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset> + getGetDatasetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset> + getGetDatasetMethod() { + return getGetDatasetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset> + getGetDatasetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset> + getGetDatasetMethod; + if ((getGetDatasetMethod = DataLabelingServiceGrpc.getGetDatasetMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getGetDatasetMethod = DataLabelingServiceGrpc.getGetDatasetMethod) == null) { + DataLabelingServiceGrpc.getGetDatasetMethod = + getGetDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "GetDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.Dataset.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("GetDataset")) + .build(); + } + } + } + return getGetDatasetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListDatasetsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse> + METHOD_LIST_DATASETS = getListDatasetsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse> + getListDatasetsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse> + getListDatasetsMethod() { + return getListDatasetsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse> + getListDatasetsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse> + getListDatasetsMethod; + if ((getListDatasetsMethod = DataLabelingServiceGrpc.getListDatasetsMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getListDatasetsMethod = DataLabelingServiceGrpc.getListDatasetsMethod) == null) { + DataLabelingServiceGrpc.getListDatasetsMethod = + getListDatasetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "ListDatasets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("ListDatasets")) + .build(); + } + } + } + return getListDatasetsMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getDeleteDatasetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest, com.google.protobuf.Empty> + METHOD_DELETE_DATASET = getDeleteDatasetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest, com.google.protobuf.Empty> + getDeleteDatasetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest, com.google.protobuf.Empty> + getDeleteDatasetMethod() { + return getDeleteDatasetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest, com.google.protobuf.Empty> + getDeleteDatasetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest, com.google.protobuf.Empty> + getDeleteDatasetMethod; + if ((getDeleteDatasetMethod = DataLabelingServiceGrpc.getDeleteDatasetMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getDeleteDatasetMethod = DataLabelingServiceGrpc.getDeleteDatasetMethod) == null) { + DataLabelingServiceGrpc.getDeleteDatasetMethod = + getDeleteDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "DeleteDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("DeleteDataset")) + .build(); + } + } + } + return getDeleteDatasetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getImportDataMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ImportDataRequest, com.google.longrunning.Operation> + METHOD_IMPORT_DATA = getImportDataMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ImportDataRequest, com.google.longrunning.Operation> + getImportDataMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ImportDataRequest, com.google.longrunning.Operation> + getImportDataMethod() { + return getImportDataMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ImportDataRequest, com.google.longrunning.Operation> + getImportDataMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ImportDataRequest, + com.google.longrunning.Operation> + getImportDataMethod; + if ((getImportDataMethod = DataLabelingServiceGrpc.getImportDataMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getImportDataMethod = DataLabelingServiceGrpc.getImportDataMethod) == null) { + DataLabelingServiceGrpc.getImportDataMethod = + getImportDataMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "ImportData")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ImportDataRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("ImportData")) + .build(); + } + } + } + return getImportDataMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getExportDataMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ExportDataRequest, com.google.longrunning.Operation> + METHOD_EXPORT_DATA = getExportDataMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ExportDataRequest, com.google.longrunning.Operation> + getExportDataMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ExportDataRequest, com.google.longrunning.Operation> + getExportDataMethod() { + return getExportDataMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ExportDataRequest, com.google.longrunning.Operation> + getExportDataMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ExportDataRequest, + com.google.longrunning.Operation> + getExportDataMethod; + if ((getExportDataMethod = DataLabelingServiceGrpc.getExportDataMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getExportDataMethod = DataLabelingServiceGrpc.getExportDataMethod) == null) { + DataLabelingServiceGrpc.getExportDataMethod = + getExportDataMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "ExportData")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ExportDataRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("ExportData")) + .build(); + } + } + } + return getExportDataMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetDataItemMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest, + com.google.cloud.datalabeling.v1beta1.DataItem> + METHOD_GET_DATA_ITEM = getGetDataItemMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest, + com.google.cloud.datalabeling.v1beta1.DataItem> + getGetDataItemMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest, + com.google.cloud.datalabeling.v1beta1.DataItem> + getGetDataItemMethod() { + return getGetDataItemMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest, + com.google.cloud.datalabeling.v1beta1.DataItem> + getGetDataItemMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest, + com.google.cloud.datalabeling.v1beta1.DataItem> + getGetDataItemMethod; + if ((getGetDataItemMethod = DataLabelingServiceGrpc.getGetDataItemMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getGetDataItemMethod = DataLabelingServiceGrpc.getGetDataItemMethod) == null) { + DataLabelingServiceGrpc.getGetDataItemMethod = + getGetDataItemMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "GetDataItem")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.DataItem.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("GetDataItem")) + .build(); + } + } + } + return getGetDataItemMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListDataItemsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest, + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse> + METHOD_LIST_DATA_ITEMS = getListDataItemsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest, + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse> + getListDataItemsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest, + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse> + getListDataItemsMethod() { + return getListDataItemsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest, + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse> + getListDataItemsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest, + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse> + getListDataItemsMethod; + if ((getListDataItemsMethod = DataLabelingServiceGrpc.getListDataItemsMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getListDataItemsMethod = DataLabelingServiceGrpc.getListDataItemsMethod) == null) { + DataLabelingServiceGrpc.getListDataItemsMethod = + getListDataItemsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "ListDataItems")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("ListDataItems")) + .build(); + } + } + } + return getListDataItemsMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetAnnotatedDatasetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset> + METHOD_GET_ANNOTATED_DATASET = getGetAnnotatedDatasetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset> + getGetAnnotatedDatasetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset> + getGetAnnotatedDatasetMethod() { + return getGetAnnotatedDatasetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset> + getGetAnnotatedDatasetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset> + getGetAnnotatedDatasetMethod; + if ((getGetAnnotatedDatasetMethod = DataLabelingServiceGrpc.getGetAnnotatedDatasetMethod) + == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getGetAnnotatedDatasetMethod = DataLabelingServiceGrpc.getGetAnnotatedDatasetMethod) + == null) { + DataLabelingServiceGrpc.getGetAnnotatedDatasetMethod = + getGetAnnotatedDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "GetAnnotatedDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset + .getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("GetAnnotatedDataset")) + .build(); + } + } + } + return getGetAnnotatedDatasetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListAnnotatedDatasetsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse> + METHOD_LIST_ANNOTATED_DATASETS = getListAnnotatedDatasetsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse> + getListAnnotatedDatasetsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse> + getListAnnotatedDatasetsMethod() { + return getListAnnotatedDatasetsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse> + getListAnnotatedDatasetsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse> + getListAnnotatedDatasetsMethod; + if ((getListAnnotatedDatasetsMethod = DataLabelingServiceGrpc.getListAnnotatedDatasetsMethod) + == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getListAnnotatedDatasetsMethod = + DataLabelingServiceGrpc.getListAnnotatedDatasetsMethod) + == null) { + DataLabelingServiceGrpc.getListAnnotatedDatasetsMethod = + getListAnnotatedDatasetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "ListAnnotatedDatasets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("ListAnnotatedDatasets")) + .build(); + } + } + } + return getListAnnotatedDatasetsMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getDeleteAnnotatedDatasetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest, + com.google.protobuf.Empty> + METHOD_DELETE_ANNOTATED_DATASET = getDeleteAnnotatedDatasetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest, + com.google.protobuf.Empty> + getDeleteAnnotatedDatasetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest, + com.google.protobuf.Empty> + getDeleteAnnotatedDatasetMethod() { + return getDeleteAnnotatedDatasetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest, + com.google.protobuf.Empty> + getDeleteAnnotatedDatasetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest, + com.google.protobuf.Empty> + getDeleteAnnotatedDatasetMethod; + if ((getDeleteAnnotatedDatasetMethod = DataLabelingServiceGrpc.getDeleteAnnotatedDatasetMethod) + == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getDeleteAnnotatedDatasetMethod = + DataLabelingServiceGrpc.getDeleteAnnotatedDatasetMethod) + == null) { + DataLabelingServiceGrpc.getDeleteAnnotatedDatasetMethod = + getDeleteAnnotatedDatasetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "DeleteAnnotatedDataset")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("DeleteAnnotatedDataset")) + .build(); + } + } + } + return getDeleteAnnotatedDatasetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getLabelImageMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelImageRequest, com.google.longrunning.Operation> + METHOD_LABEL_IMAGE = getLabelImageMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelImageRequest, com.google.longrunning.Operation> + getLabelImageMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelImageRequest, com.google.longrunning.Operation> + getLabelImageMethod() { + return getLabelImageMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelImageRequest, com.google.longrunning.Operation> + getLabelImageMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelImageRequest, + com.google.longrunning.Operation> + getLabelImageMethod; + if ((getLabelImageMethod = DataLabelingServiceGrpc.getLabelImageMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getLabelImageMethod = DataLabelingServiceGrpc.getLabelImageMethod) == null) { + DataLabelingServiceGrpc.getLabelImageMethod = + getLabelImageMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "LabelImage")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.LabelImageRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("LabelImage")) + .build(); + } + } + } + return getLabelImageMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getLabelVideoMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest, com.google.longrunning.Operation> + METHOD_LABEL_VIDEO = getLabelVideoMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest, com.google.longrunning.Operation> + getLabelVideoMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest, com.google.longrunning.Operation> + getLabelVideoMethod() { + return getLabelVideoMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest, com.google.longrunning.Operation> + getLabelVideoMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest, + com.google.longrunning.Operation> + getLabelVideoMethod; + if ((getLabelVideoMethod = DataLabelingServiceGrpc.getLabelVideoMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getLabelVideoMethod = DataLabelingServiceGrpc.getLabelVideoMethod) == null) { + DataLabelingServiceGrpc.getLabelVideoMethod = + getLabelVideoMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "LabelVideo")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("LabelVideo")) + .build(); + } + } + } + return getLabelVideoMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getLabelTextMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelTextRequest, com.google.longrunning.Operation> + METHOD_LABEL_TEXT = getLabelTextMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelTextRequest, com.google.longrunning.Operation> + getLabelTextMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelTextRequest, com.google.longrunning.Operation> + getLabelTextMethod() { + return getLabelTextMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelTextRequest, com.google.longrunning.Operation> + getLabelTextMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelTextRequest, + com.google.longrunning.Operation> + getLabelTextMethod; + if ((getLabelTextMethod = DataLabelingServiceGrpc.getLabelTextMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getLabelTextMethod = DataLabelingServiceGrpc.getLabelTextMethod) == null) { + DataLabelingServiceGrpc.getLabelTextMethod = + getLabelTextMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", "LabelText")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.LabelTextRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("LabelText")) + .build(); + } + } + } + return getLabelTextMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getLabelAudioMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest, com.google.longrunning.Operation> + METHOD_LABEL_AUDIO = getLabelAudioMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest, com.google.longrunning.Operation> + getLabelAudioMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest, com.google.longrunning.Operation> + getLabelAudioMethod() { + return getLabelAudioMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest, com.google.longrunning.Operation> + getLabelAudioMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest, + com.google.longrunning.Operation> + getLabelAudioMethod; + if ((getLabelAudioMethod = DataLabelingServiceGrpc.getLabelAudioMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getLabelAudioMethod = DataLabelingServiceGrpc.getLabelAudioMethod) == null) { + DataLabelingServiceGrpc.getLabelAudioMethod = + getLabelAudioMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "LabelAudio")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("LabelAudio")) + .build(); + } + } + } + return getLabelAudioMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetExampleMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetExampleRequest, + com.google.cloud.datalabeling.v1beta1.Example> + METHOD_GET_EXAMPLE = getGetExampleMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetExampleRequest, + com.google.cloud.datalabeling.v1beta1.Example> + getGetExampleMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetExampleRequest, + com.google.cloud.datalabeling.v1beta1.Example> + getGetExampleMethod() { + return getGetExampleMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetExampleRequest, + com.google.cloud.datalabeling.v1beta1.Example> + getGetExampleMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetExampleRequest, + com.google.cloud.datalabeling.v1beta1.Example> + getGetExampleMethod; + if ((getGetExampleMethod = DataLabelingServiceGrpc.getGetExampleMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getGetExampleMethod = DataLabelingServiceGrpc.getGetExampleMethod) == null) { + DataLabelingServiceGrpc.getGetExampleMethod = + getGetExampleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "GetExample")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.GetExampleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.Example.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("GetExample")) + .build(); + } + } + } + return getGetExampleMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListExamplesMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest, + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse> + METHOD_LIST_EXAMPLES = getListExamplesMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest, + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse> + getListExamplesMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest, + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse> + getListExamplesMethod() { + return getListExamplesMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest, + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse> + getListExamplesMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest, + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse> + getListExamplesMethod; + if ((getListExamplesMethod = DataLabelingServiceGrpc.getListExamplesMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getListExamplesMethod = DataLabelingServiceGrpc.getListExamplesMethod) == null) { + DataLabelingServiceGrpc.getListExamplesMethod = + getListExamplesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "ListExamples")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("ListExamples")) + .build(); + } + } + } + return getListExamplesMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateAnnotationSpecSetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + METHOD_CREATE_ANNOTATION_SPEC_SET = getCreateAnnotationSpecSetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + getCreateAnnotationSpecSetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + getCreateAnnotationSpecSetMethod() { + return getCreateAnnotationSpecSetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + getCreateAnnotationSpecSetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + getCreateAnnotationSpecSetMethod; + if ((getCreateAnnotationSpecSetMethod = + DataLabelingServiceGrpc.getCreateAnnotationSpecSetMethod) + == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getCreateAnnotationSpecSetMethod = + DataLabelingServiceGrpc.getCreateAnnotationSpecSetMethod) + == null) { + DataLabelingServiceGrpc.getCreateAnnotationSpecSetMethod = + getCreateAnnotationSpecSetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "CreateAnnotationSpecSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet + .getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier( + "CreateAnnotationSpecSet")) + .build(); + } + } + } + return getCreateAnnotationSpecSetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetAnnotationSpecSetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + METHOD_GET_ANNOTATION_SPEC_SET = getGetAnnotationSpecSetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + getGetAnnotationSpecSetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + getGetAnnotationSpecSetMethod() { + return getGetAnnotationSpecSetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + getGetAnnotationSpecSetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + getGetAnnotationSpecSetMethod; + if ((getGetAnnotationSpecSetMethod = DataLabelingServiceGrpc.getGetAnnotationSpecSetMethod) + == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getGetAnnotationSpecSetMethod = DataLabelingServiceGrpc.getGetAnnotationSpecSetMethod) + == null) { + DataLabelingServiceGrpc.getGetAnnotationSpecSetMethod = + getGetAnnotationSpecSetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "GetAnnotationSpecSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet + .getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("GetAnnotationSpecSet")) + .build(); + } + } + } + return getGetAnnotationSpecSetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListAnnotationSpecSetsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse> + METHOD_LIST_ANNOTATION_SPEC_SETS = getListAnnotationSpecSetsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse> + getListAnnotationSpecSetsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse> + getListAnnotationSpecSetsMethod() { + return getListAnnotationSpecSetsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse> + getListAnnotationSpecSetsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse> + getListAnnotationSpecSetsMethod; + if ((getListAnnotationSpecSetsMethod = DataLabelingServiceGrpc.getListAnnotationSpecSetsMethod) + == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getListAnnotationSpecSetsMethod = + DataLabelingServiceGrpc.getListAnnotationSpecSetsMethod) + == null) { + DataLabelingServiceGrpc.getListAnnotationSpecSetsMethod = + getListAnnotationSpecSetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "ListAnnotationSpecSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("ListAnnotationSpecSets")) + .build(); + } + } + } + return getListAnnotationSpecSetsMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getDeleteAnnotationSpecSetMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest, + com.google.protobuf.Empty> + METHOD_DELETE_ANNOTATION_SPEC_SET = getDeleteAnnotationSpecSetMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest, + com.google.protobuf.Empty> + getDeleteAnnotationSpecSetMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest, + com.google.protobuf.Empty> + getDeleteAnnotationSpecSetMethod() { + return getDeleteAnnotationSpecSetMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest, + com.google.protobuf.Empty> + getDeleteAnnotationSpecSetMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest, + com.google.protobuf.Empty> + getDeleteAnnotationSpecSetMethod; + if ((getDeleteAnnotationSpecSetMethod = + DataLabelingServiceGrpc.getDeleteAnnotationSpecSetMethod) + == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getDeleteAnnotationSpecSetMethod = + DataLabelingServiceGrpc.getDeleteAnnotationSpecSetMethod) + == null) { + DataLabelingServiceGrpc.getDeleteAnnotationSpecSetMethod = + getDeleteAnnotationSpecSetMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "DeleteAnnotationSpecSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier( + "DeleteAnnotationSpecSet")) + .build(); + } + } + } + return getDeleteAnnotationSpecSetMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateInstructionMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest, + com.google.longrunning.Operation> + METHOD_CREATE_INSTRUCTION = getCreateInstructionMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest, + com.google.longrunning.Operation> + getCreateInstructionMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest, + com.google.longrunning.Operation> + getCreateInstructionMethod() { + return getCreateInstructionMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest, + com.google.longrunning.Operation> + getCreateInstructionMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest, + com.google.longrunning.Operation> + getCreateInstructionMethod; + if ((getCreateInstructionMethod = DataLabelingServiceGrpc.getCreateInstructionMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getCreateInstructionMethod = DataLabelingServiceGrpc.getCreateInstructionMethod) + == null) { + DataLabelingServiceGrpc.getCreateInstructionMethod = + getCreateInstructionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "CreateInstruction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("CreateInstruction")) + .build(); + } + } + } + return getCreateInstructionMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetInstructionMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest, + com.google.cloud.datalabeling.v1beta1.Instruction> + METHOD_GET_INSTRUCTION = getGetInstructionMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest, + com.google.cloud.datalabeling.v1beta1.Instruction> + getGetInstructionMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest, + com.google.cloud.datalabeling.v1beta1.Instruction> + getGetInstructionMethod() { + return getGetInstructionMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest, + com.google.cloud.datalabeling.v1beta1.Instruction> + getGetInstructionMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest, + com.google.cloud.datalabeling.v1beta1.Instruction> + getGetInstructionMethod; + if ((getGetInstructionMethod = DataLabelingServiceGrpc.getGetInstructionMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getGetInstructionMethod = DataLabelingServiceGrpc.getGetInstructionMethod) == null) { + DataLabelingServiceGrpc.getGetInstructionMethod = + getGetInstructionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "GetInstruction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.Instruction + .getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("GetInstruction")) + .build(); + } + } + } + return getGetInstructionMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListInstructionsMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest, + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse> + METHOD_LIST_INSTRUCTIONS = getListInstructionsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest, + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse> + getListInstructionsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest, + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse> + getListInstructionsMethod() { + return getListInstructionsMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest, + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse> + getListInstructionsMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest, + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse> + getListInstructionsMethod; + if ((getListInstructionsMethod = DataLabelingServiceGrpc.getListInstructionsMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getListInstructionsMethod = DataLabelingServiceGrpc.getListInstructionsMethod) + == null) { + DataLabelingServiceGrpc.getListInstructionsMethod = + getListInstructionsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "ListInstructions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("ListInstructions")) + .build(); + } + } + } + return getListInstructionsMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getDeleteInstructionMethod()} instead. + public static final io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest, com.google.protobuf.Empty> + METHOD_DELETE_INSTRUCTION = getDeleteInstructionMethodHelper(); + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest, com.google.protobuf.Empty> + getDeleteInstructionMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest, com.google.protobuf.Empty> + getDeleteInstructionMethod() { + return getDeleteInstructionMethodHelper(); + } + + private static io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest, com.google.protobuf.Empty> + getDeleteInstructionMethodHelper() { + io.grpc.MethodDescriptor< + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest, + com.google.protobuf.Empty> + getDeleteInstructionMethod; + if ((getDeleteInstructionMethod = DataLabelingServiceGrpc.getDeleteInstructionMethod) == null) { + synchronized (DataLabelingServiceGrpc.class) { + if ((getDeleteInstructionMethod = DataLabelingServiceGrpc.getDeleteInstructionMethod) + == null) { + DataLabelingServiceGrpc.getDeleteInstructionMethod = + getDeleteInstructionMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService", + "DeleteInstruction")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new DataLabelingServiceMethodDescriptorSupplier("DeleteInstruction")) + .build(); + } + } + } + return getDeleteInstructionMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DataLabelingServiceStub newStub(io.grpc.Channel channel) { + return new DataLabelingServiceStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataLabelingServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + return new DataLabelingServiceBlockingStub(channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DataLabelingServiceFutureStub newFutureStub(io.grpc.Channel channel) { + return new DataLabelingServiceFutureStub(channel); + } + + /** */ + public abstract static class DataLabelingServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates dataset. If success return a Dataset resource.
+     * 
+ */ + public void createDataset( + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateDatasetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Gets dataset by resource name.
+     * 
+ */ + public void getDataset( + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetDatasetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Lists datasets under a project. Pagination is supported.
+     * 
+ */ + public void listDatasets( + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListDatasetsMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Deletes a dataset by resource name.
+     * 
+ */ + public void deleteDataset( + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteDatasetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Imports data into dataset based on source locations defined in request.
+     * It can be called multiple times for the same dataset. Each dataset can
+     * only have one long running operation running on it. For example, no
+     * labeling task (also long running operation) can be started while
+     * importing is still ongoing. Vice versa.
+     * 
+ */ + public void importData( + com.google.cloud.datalabeling.v1beta1.ImportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getImportDataMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Exports data and annotations from dataset.
+     * 
+ */ + public void exportData( + com.google.cloud.datalabeling.v1beta1.ExportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getExportDataMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Gets a data item in a dataset by resource name. This API can be
+     * called after data are imported into dataset.
+     * 
+ */ + public void getDataItem( + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetDataItemMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Lists data items in a dataset. This API can be called after data
+     * are imported into dataset. Pagination is supported.
+     * 
+ */ + public void listDataItems( + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListDataItemsMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Gets an annotated dataset by resource name.
+     * 
+ */ + public void getAnnotatedDataset( + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetAnnotatedDatasetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Lists annotated datasets for a dataset. Pagination is supported.
+     * 
+ */ + public void listAnnotatedDatasets( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListAnnotatedDatasetsMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Deletes an annotated dataset by resource name.
+     * 
+ */ + public void deleteAnnotatedDataset( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteAnnotatedDatasetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Starts a labeling task for image. The type of image labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public void labelImage( + com.google.cloud.datalabeling.v1beta1.LabelImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLabelImageMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Starts a labeling task for video. The type of video labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public void labelVideo( + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLabelVideoMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Starts a labeling task for text. The type of text labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public void labelText( + com.google.cloud.datalabeling.v1beta1.LabelTextRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLabelTextMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Starts a labeling task for audio. The type of audio labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public void labelAudio( + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLabelAudioMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Gets an example by resource name, including both data and annotation.
+     * 
+ */ + public void getExample( + com.google.cloud.datalabeling.v1beta1.GetExampleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetExampleMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Lists examples in an annotated dataset. Pagination is supported.
+     * 
+ */ + public void listExamples( + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListExamplesMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Creates an annotation spec set by providing a set of labels.
+     * 
+ */ + public void createAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateAnnotationSpecSetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Gets an annotation spec set by resource name.
+     * 
+ */ + public void getAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetAnnotationSpecSetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Lists annotation spec sets for a project. Pagination is supported.
+     * 
+ */ + public void listAnnotationSpecSets( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getListAnnotationSpecSetsMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Deletes an annotation spec set by resource name.
+     * 
+ */ + public void deleteAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteAnnotationSpecSetMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Creates an instruction for how data should be labeled.
+     * 
+ */ + public void createInstruction( + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateInstructionMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Gets an instruction by resource name.
+     * 
+ */ + public void getInstruction( + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetInstructionMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Lists instructions for a project. Pagination is supported.
+     * 
+ */ + public void listInstructions( + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListInstructionsMethodHelper(), responseObserver); + } + + /** + * + * + *
+     * Deletes an instruction object by resource name.
+     * 
+ */ + public void deleteInstruction( + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteInstructionMethodHelper(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateDatasetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset>( + this, METHODID_CREATE_DATASET))) + .addMethod( + getGetDatasetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest, + com.google.cloud.datalabeling.v1beta1.Dataset>(this, METHODID_GET_DATASET))) + .addMethod( + getListDatasetsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse>( + this, METHODID_LIST_DATASETS))) + .addMethod( + getDeleteDatasetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_DATASET))) + .addMethod( + getImportDataMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.ImportDataRequest, + com.google.longrunning.Operation>(this, METHODID_IMPORT_DATA))) + .addMethod( + getExportDataMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.ExportDataRequest, + com.google.longrunning.Operation>(this, METHODID_EXPORT_DATA))) + .addMethod( + getGetDataItemMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest, + com.google.cloud.datalabeling.v1beta1.DataItem>( + this, METHODID_GET_DATA_ITEM))) + .addMethod( + getListDataItemsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest, + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse>( + this, METHODID_LIST_DATA_ITEMS))) + .addMethod( + getGetAnnotatedDatasetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset>( + this, METHODID_GET_ANNOTATED_DATASET))) + .addMethod( + getListAnnotatedDatasetsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse>( + this, METHODID_LIST_ANNOTATED_DATASETS))) + .addMethod( + getDeleteAnnotatedDatasetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_ANNOTATED_DATASET))) + .addMethod( + getLabelImageMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.LabelImageRequest, + com.google.longrunning.Operation>(this, METHODID_LABEL_IMAGE))) + .addMethod( + getLabelVideoMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest, + com.google.longrunning.Operation>(this, METHODID_LABEL_VIDEO))) + .addMethod( + getLabelTextMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.LabelTextRequest, + com.google.longrunning.Operation>(this, METHODID_LABEL_TEXT))) + .addMethod( + getLabelAudioMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest, + com.google.longrunning.Operation>(this, METHODID_LABEL_AUDIO))) + .addMethod( + getGetExampleMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.GetExampleRequest, + com.google.cloud.datalabeling.v1beta1.Example>(this, METHODID_GET_EXAMPLE))) + .addMethod( + getListExamplesMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest, + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse>( + this, METHODID_LIST_EXAMPLES))) + .addMethod( + getCreateAnnotationSpecSetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet>( + this, METHODID_CREATE_ANNOTATION_SPEC_SET))) + .addMethod( + getGetAnnotationSpecSetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet>( + this, METHODID_GET_ANNOTATION_SPEC_SET))) + .addMethod( + getListAnnotationSpecSetsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest, + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse>( + this, METHODID_LIST_ANNOTATION_SPEC_SETS))) + .addMethod( + getDeleteAnnotationSpecSetMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_ANNOTATION_SPEC_SET))) + .addMethod( + getCreateInstructionMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_INSTRUCTION))) + .addMethod( + getGetInstructionMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest, + com.google.cloud.datalabeling.v1beta1.Instruction>( + this, METHODID_GET_INSTRUCTION))) + .addMethod( + getListInstructionsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest, + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse>( + this, METHODID_LIST_INSTRUCTIONS))) + .addMethod( + getDeleteInstructionMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_INSTRUCTION))) + .build(); + } + } + + /** */ + public static final class DataLabelingServiceStub + extends io.grpc.stub.AbstractStub { + private DataLabelingServiceStub(io.grpc.Channel channel) { + super(channel); + } + + private DataLabelingServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataLabelingServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataLabelingServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates dataset. If success return a Dataset resource.
+     * 
+ */ + public void createDataset( + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateDatasetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets dataset by resource name.
+     * 
+ */ + public void getDataset( + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetDatasetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists datasets under a project. Pagination is supported.
+     * 
+ */ + public void listDatasets( + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListDatasetsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a dataset by resource name.
+     * 
+ */ + public void deleteDataset( + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteDatasetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Imports data into dataset based on source locations defined in request.
+     * It can be called multiple times for the same dataset. Each dataset can
+     * only have one long running operation running on it. For example, no
+     * labeling task (also long running operation) can be started while
+     * importing is still ongoing. Vice versa.
+     * 
+ */ + public void importData( + com.google.cloud.datalabeling.v1beta1.ImportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getImportDataMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Exports data and annotations from dataset.
+     * 
+ */ + public void exportData( + com.google.cloud.datalabeling.v1beta1.ExportDataRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getExportDataMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a data item in a dataset by resource name. This API can be
+     * called after data are imported into dataset.
+     * 
+ */ + public void getDataItem( + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetDataItemMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists data items in a dataset. This API can be called after data
+     * are imported into dataset. Pagination is supported.
+     * 
+ */ + public void listDataItems( + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListDataItemsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an annotated dataset by resource name.
+     * 
+ */ + public void getAnnotatedDataset( + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetAnnotatedDatasetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists annotated datasets for a dataset. Pagination is supported.
+     * 
+ */ + public void listAnnotatedDatasets( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListAnnotatedDatasetsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an annotated dataset by resource name.
+     * 
+ */ + public void deleteAnnotatedDataset( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteAnnotatedDatasetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts a labeling task for image. The type of image labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public void labelImage( + com.google.cloud.datalabeling.v1beta1.LabelImageRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getLabelImageMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts a labeling task for video. The type of video labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public void labelVideo( + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getLabelVideoMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts a labeling task for text. The type of text labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public void labelText( + com.google.cloud.datalabeling.v1beta1.LabelTextRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getLabelTextMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts a labeling task for audio. The type of audio labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public void labelAudio( + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getLabelAudioMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an example by resource name, including both data and annotation.
+     * 
+ */ + public void getExample( + com.google.cloud.datalabeling.v1beta1.GetExampleRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetExampleMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists examples in an annotated dataset. Pagination is supported.
+     * 
+ */ + public void listExamples( + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListExamplesMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an annotation spec set by providing a set of labels.
+     * 
+ */ + public void createAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateAnnotationSpecSetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an annotation spec set by resource name.
+     * 
+ */ + public void getAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetAnnotationSpecSetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists annotation spec sets for a project. Pagination is supported.
+     * 
+ */ + public void listAnnotationSpecSets( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListAnnotationSpecSetsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an annotation spec set by resource name.
+     * 
+ */ + public void deleteAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteAnnotationSpecSetMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an instruction for how data should be labeled.
+     * 
+ */ + public void createInstruction( + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateInstructionMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an instruction by resource name.
+     * 
+ */ + public void getInstruction( + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetInstructionMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists instructions for a project. Pagination is supported.
+     * 
+ */ + public void listInstructions( + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListInstructionsMethodHelper(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an instruction object by resource name.
+     * 
+ */ + public void deleteInstruction( + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteInstructionMethodHelper(), getCallOptions()), + request, + responseObserver); + } + } + + /** */ + public static final class DataLabelingServiceBlockingStub + extends io.grpc.stub.AbstractStub { + private DataLabelingServiceBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private DataLabelingServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataLabelingServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataLabelingServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates dataset. If success return a Dataset resource.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.Dataset createDataset( + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest request) { + return blockingUnaryCall( + getChannel(), getCreateDatasetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets dataset by resource name.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.Dataset getDataset( + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest request) { + return blockingUnaryCall( + getChannel(), getGetDatasetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists datasets under a project. Pagination is supported.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse listDatasets( + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest request) { + return blockingUnaryCall( + getChannel(), getListDatasetsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a dataset by resource name.
+     * 
+ */ + public com.google.protobuf.Empty deleteDataset( + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteDatasetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Imports data into dataset based on source locations defined in request.
+     * It can be called multiple times for the same dataset. Each dataset can
+     * only have one long running operation running on it. For example, no
+     * labeling task (also long running operation) can be started while
+     * importing is still ongoing. Vice versa.
+     * 
+ */ + public com.google.longrunning.Operation importData( + com.google.cloud.datalabeling.v1beta1.ImportDataRequest request) { + return blockingUnaryCall( + getChannel(), getImportDataMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports data and annotations from dataset.
+     * 
+ */ + public com.google.longrunning.Operation exportData( + com.google.cloud.datalabeling.v1beta1.ExportDataRequest request) { + return blockingUnaryCall( + getChannel(), getExportDataMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a data item in a dataset by resource name. This API can be
+     * called after data are imported into dataset.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.DataItem getDataItem( + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest request) { + return blockingUnaryCall( + getChannel(), getGetDataItemMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists data items in a dataset. This API can be called after data
+     * are imported into dataset. Pagination is supported.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse listDataItems( + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest request) { + return blockingUnaryCall( + getChannel(), getListDataItemsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an annotated dataset by resource name.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDataset getAnnotatedDataset( + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest request) { + return blockingUnaryCall( + getChannel(), getGetAnnotatedDatasetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists annotated datasets for a dataset. Pagination is supported.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + listAnnotatedDatasets( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest request) { + return blockingUnaryCall( + getChannel(), getListAnnotatedDatasetsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an annotated dataset by resource name.
+     * 
+ */ + public com.google.protobuf.Empty deleteAnnotatedDataset( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteAnnotatedDatasetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts a labeling task for image. The type of image labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public com.google.longrunning.Operation labelImage( + com.google.cloud.datalabeling.v1beta1.LabelImageRequest request) { + return blockingUnaryCall( + getChannel(), getLabelImageMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts a labeling task for video. The type of video labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public com.google.longrunning.Operation labelVideo( + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest request) { + return blockingUnaryCall( + getChannel(), getLabelVideoMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts a labeling task for text. The type of text labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public com.google.longrunning.Operation labelText( + com.google.cloud.datalabeling.v1beta1.LabelTextRequest request) { + return blockingUnaryCall(getChannel(), getLabelTextMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts a labeling task for audio. The type of audio labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public com.google.longrunning.Operation labelAudio( + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest request) { + return blockingUnaryCall( + getChannel(), getLabelAudioMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an example by resource name, including both data and annotation.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.Example getExample( + com.google.cloud.datalabeling.v1beta1.GetExampleRequest request) { + return blockingUnaryCall( + getChannel(), getGetExampleMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists examples in an annotated dataset. Pagination is supported.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.ListExamplesResponse listExamples( + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest request) { + return blockingUnaryCall( + getChannel(), getListExamplesMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an annotation spec set by providing a set of labels.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet createAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest request) { + return blockingUnaryCall( + getChannel(), getCreateAnnotationSpecSetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an annotation spec set by resource name.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet getAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest request) { + return blockingUnaryCall( + getChannel(), getGetAnnotationSpecSetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists annotation spec sets for a project. Pagination is supported.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + listAnnotationSpecSets( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest request) { + return blockingUnaryCall( + getChannel(), getListAnnotationSpecSetsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an annotation spec set by resource name.
+     * 
+ */ + public com.google.protobuf.Empty deleteAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteAnnotationSpecSetMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an instruction for how data should be labeled.
+     * 
+ */ + public com.google.longrunning.Operation createInstruction( + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest request) { + return blockingUnaryCall( + getChannel(), getCreateInstructionMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an instruction by resource name.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.Instruction getInstruction( + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest request) { + return blockingUnaryCall( + getChannel(), getGetInstructionMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists instructions for a project. Pagination is supported.
+     * 
+ */ + public com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse listInstructions( + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest request) { + return blockingUnaryCall( + getChannel(), getListInstructionsMethodHelper(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an instruction object by resource name.
+     * 
+ */ + public com.google.protobuf.Empty deleteInstruction( + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteInstructionMethodHelper(), getCallOptions(), request); + } + } + + /** */ + public static final class DataLabelingServiceFutureStub + extends io.grpc.stub.AbstractStub { + private DataLabelingServiceFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private DataLabelingServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataLabelingServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataLabelingServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates dataset. If success return a Dataset resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.Dataset> + createDataset(com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateDatasetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets dataset by resource name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.Dataset> + getDataset(com.google.cloud.datalabeling.v1beta1.GetDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetDatasetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists datasets under a project. Pagination is supported.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse> + listDatasets(com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListDatasetsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a dataset by resource name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDataset(com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteDatasetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Imports data into dataset based on source locations defined in request.
+     * It can be called multiple times for the same dataset. Each dataset can
+     * only have one long running operation running on it. For example, no
+     * labeling task (also long running operation) can be started while
+     * importing is still ongoing. Vice versa.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + importData(com.google.cloud.datalabeling.v1beta1.ImportDataRequest request) { + return futureUnaryCall( + getChannel().newCall(getImportDataMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports data and annotations from dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportData(com.google.cloud.datalabeling.v1beta1.ExportDataRequest request) { + return futureUnaryCall( + getChannel().newCall(getExportDataMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a data item in a dataset by resource name. This API can be
+     * called after data are imported into dataset.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.DataItem> + getDataItem(com.google.cloud.datalabeling.v1beta1.GetDataItemRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetDataItemMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists data items in a dataset. This API can be called after data
+     * are imported into dataset. Pagination is supported.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse> + listDataItems(com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListDataItemsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an annotated dataset by resource name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset> + getAnnotatedDataset( + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetAnnotatedDatasetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists annotated datasets for a dataset. Pagination is supported.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse> + listAnnotatedDatasets( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListAnnotatedDatasetsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an annotated dataset by resource name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAnnotatedDataset( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteAnnotatedDatasetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts a labeling task for image. The type of image labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + labelImage(com.google.cloud.datalabeling.v1beta1.LabelImageRequest request) { + return futureUnaryCall( + getChannel().newCall(getLabelImageMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts a labeling task for video. The type of video labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + labelVideo(com.google.cloud.datalabeling.v1beta1.LabelVideoRequest request) { + return futureUnaryCall( + getChannel().newCall(getLabelVideoMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts a labeling task for text. The type of text labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + labelText(com.google.cloud.datalabeling.v1beta1.LabelTextRequest request) { + return futureUnaryCall( + getChannel().newCall(getLabelTextMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts a labeling task for audio. The type of audio labeling task is
+     * configured by feature in the request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + labelAudio(com.google.cloud.datalabeling.v1beta1.LabelAudioRequest request) { + return futureUnaryCall( + getChannel().newCall(getLabelAudioMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an example by resource name, including both data and annotation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.Example> + getExample(com.google.cloud.datalabeling.v1beta1.GetExampleRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetExampleMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists examples in an annotated dataset. Pagination is supported.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse> + listExamples(com.google.cloud.datalabeling.v1beta1.ListExamplesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListExamplesMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an annotation spec set by providing a set of labels.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + createAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateAnnotationSpecSetMethodHelper(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Gets an annotation spec set by resource name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet> + getAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetAnnotationSpecSetMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists annotation spec sets for a project. Pagination is supported.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse> + listAnnotationSpecSets( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListAnnotationSpecSetsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an annotation spec set by resource name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteAnnotationSpecSetMethodHelper(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Creates an instruction for how data should be labeled.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createInstruction(com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateInstructionMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an instruction by resource name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.Instruction> + getInstruction(com.google.cloud.datalabeling.v1beta1.GetInstructionRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetInstructionMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists instructions for a project. Pagination is supported.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse> + listInstructions(com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListInstructionsMethodHelper(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an instruction object by resource name.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteInstruction(com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteInstructionMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_DATASET = 0; + private static final int METHODID_GET_DATASET = 1; + private static final int METHODID_LIST_DATASETS = 2; + private static final int METHODID_DELETE_DATASET = 3; + private static final int METHODID_IMPORT_DATA = 4; + private static final int METHODID_EXPORT_DATA = 5; + private static final int METHODID_GET_DATA_ITEM = 6; + private static final int METHODID_LIST_DATA_ITEMS = 7; + private static final int METHODID_GET_ANNOTATED_DATASET = 8; + private static final int METHODID_LIST_ANNOTATED_DATASETS = 9; + private static final int METHODID_DELETE_ANNOTATED_DATASET = 10; + private static final int METHODID_LABEL_IMAGE = 11; + private static final int METHODID_LABEL_VIDEO = 12; + private static final int METHODID_LABEL_TEXT = 13; + private static final int METHODID_LABEL_AUDIO = 14; + private static final int METHODID_GET_EXAMPLE = 15; + private static final int METHODID_LIST_EXAMPLES = 16; + private static final int METHODID_CREATE_ANNOTATION_SPEC_SET = 17; + private static final int METHODID_GET_ANNOTATION_SPEC_SET = 18; + private static final int METHODID_LIST_ANNOTATION_SPEC_SETS = 19; + private static final int METHODID_DELETE_ANNOTATION_SPEC_SET = 20; + private static final int METHODID_CREATE_INSTRUCTION = 21; + private static final int METHODID_GET_INSTRUCTION = 22; + private static final int METHODID_LIST_INSTRUCTIONS = 23; + private static final int METHODID_DELETE_INSTRUCTION = 24; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final DataLabelingServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DataLabelingServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_CREATE_DATASET: + serviceImpl.createDataset( + (com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_DATASET: + serviceImpl.getDataset( + (com.google.cloud.datalabeling.v1beta1.GetDatasetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_DATASETS: + serviceImpl.listDatasets( + (com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse>) + responseObserver); + break; + case METHODID_DELETE_DATASET: + serviceImpl.deleteDataset( + (com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_IMPORT_DATA: + serviceImpl.importData( + (com.google.cloud.datalabeling.v1beta1.ImportDataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_EXPORT_DATA: + serviceImpl.exportData( + (com.google.cloud.datalabeling.v1beta1.ExportDataRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_DATA_ITEM: + serviceImpl.getDataItem( + (com.google.cloud.datalabeling.v1beta1.GetDataItemRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_DATA_ITEMS: + serviceImpl.listDataItems( + (com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse>) + responseObserver); + break; + case METHODID_GET_ANNOTATED_DATASET: + serviceImpl.getAnnotatedDataset( + (com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ANNOTATED_DATASETS: + serviceImpl.listAnnotatedDatasets( + (com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse>) + responseObserver); + break; + case METHODID_DELETE_ANNOTATED_DATASET: + serviceImpl.deleteAnnotatedDataset( + (com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LABEL_IMAGE: + serviceImpl.labelImage( + (com.google.cloud.datalabeling.v1beta1.LabelImageRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LABEL_VIDEO: + serviceImpl.labelVideo( + (com.google.cloud.datalabeling.v1beta1.LabelVideoRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LABEL_TEXT: + serviceImpl.labelText( + (com.google.cloud.datalabeling.v1beta1.LabelTextRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LABEL_AUDIO: + serviceImpl.labelAudio( + (com.google.cloud.datalabeling.v1beta1.LabelAudioRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_EXAMPLE: + serviceImpl.getExample( + (com.google.cloud.datalabeling.v1beta1.GetExampleRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_EXAMPLES: + serviceImpl.listExamples( + (com.google.cloud.datalabeling.v1beta1.ListExamplesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse>) + responseObserver); + break; + case METHODID_CREATE_ANNOTATION_SPEC_SET: + serviceImpl.createAnnotationSpecSet( + (com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ANNOTATION_SPEC_SET: + serviceImpl.getAnnotationSpecSet( + (com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ANNOTATION_SPEC_SETS: + serviceImpl.listAnnotationSpecSets( + (com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse>) + responseObserver); + break; + case METHODID_DELETE_ANNOTATION_SPEC_SET: + serviceImpl.deleteAnnotationSpecSet( + (com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_INSTRUCTION: + serviceImpl.createInstruction( + (com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_INSTRUCTION: + serviceImpl.getInstruction( + (com.google.cloud.datalabeling.v1beta1.GetInstructionRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_INSTRUCTIONS: + serviceImpl.listInstructions( + (com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse>) + responseObserver); + break; + case METHODID_DELETE_INSTRUCTION: + serviceImpl.deleteInstruction( + (com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class DataLabelingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataLabelingServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataLabelingService"); + } + } + + private static final class DataLabelingServiceFileDescriptorSupplier + extends DataLabelingServiceBaseDescriptorSupplier { + DataLabelingServiceFileDescriptorSupplier() {} + } + + private static final class DataLabelingServiceMethodDescriptorSupplier + extends DataLabelingServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataLabelingServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DataLabelingServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataLabelingServiceFileDescriptorSupplier()) + .addMethod(getCreateDatasetMethodHelper()) + .addMethod(getGetDatasetMethodHelper()) + .addMethod(getListDatasetsMethodHelper()) + .addMethod(getDeleteDatasetMethodHelper()) + .addMethod(getImportDataMethodHelper()) + .addMethod(getExportDataMethodHelper()) + .addMethod(getGetDataItemMethodHelper()) + .addMethod(getListDataItemsMethodHelper()) + .addMethod(getGetAnnotatedDatasetMethodHelper()) + .addMethod(getListAnnotatedDatasetsMethodHelper()) + .addMethod(getDeleteAnnotatedDatasetMethodHelper()) + .addMethod(getLabelImageMethodHelper()) + .addMethod(getLabelVideoMethodHelper()) + .addMethod(getLabelTextMethodHelper()) + .addMethod(getLabelAudioMethodHelper()) + .addMethod(getGetExampleMethodHelper()) + .addMethod(getListExamplesMethodHelper()) + .addMethod(getCreateAnnotationSpecSetMethodHelper()) + .addMethod(getGetAnnotationSpecSetMethodHelper()) + .addMethod(getListAnnotationSpecSetsMethodHelper()) + .addMethod(getDeleteAnnotationSpecSetMethodHelper()) + .addMethod(getCreateInstructionMethodHelper()) + .addMethod(getGetInstructionMethodHelper()) + .addMethod(getListInstructionsMethodHelper()) + .addMethod(getDeleteInstructionMethodHelper()) + .build(); + } + } + } + return result; + } +} diff --git a/google-api-grpc/pom.xml b/google-api-grpc/pom.xml index e4cac66dc802..8ac4758e6c95 100644 --- a/google-api-grpc/pom.xml +++ b/google-api-grpc/pom.xml @@ -229,6 +229,16 @@ grpc-google-cloud-containeranalysis-v1beta1 0.50.1-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-datalabeling-v1beta1 + 0.50.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-datalabeling-v1beta1 + 0.50.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-dataproc-v1 @@ -737,6 +747,7 @@ grpc-google-cloud-bigtable-v2 grpc-google-cloud-container-v1 grpc-google-cloud-containeranalysis-v1beta1 + grpc-google-cloud-datalabeling-v1beta1 grpc-google-cloud-dataproc-v1 grpc-google-cloud-dataproc-v1beta2 grpc-google-cloud-dialogflow-v2 @@ -796,6 +807,7 @@ proto-google-cloud-bigtable-v2 proto-google-cloud-container-v1 proto-google-cloud-containeranalysis-v1beta1 + proto-google-cloud-datalabeling-v1beta1 proto-google-cloud-dataproc-v1 proto-google-cloud-dataproc-v1beta2 proto-google-cloud-datastore-v1 diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/pom.xml b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/pom.xml new file mode 100644 index 000000000000..12b3d2b46b16 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/pom.xml @@ -0,0 +1,36 @@ + + 4.0.0 + proto-google-cloud-datalabeling-v1beta1 + 0.50.1-SNAPSHOT + proto-google-cloud-datalabeling-v1beta1 + PROTO library for proto-google-cloud-datalabeling-v1beta1 + + com.google.api.grpc + google-api-grpc + 0.50.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + compile + + + com.google.api + api-common + compile + + + com.google.api.grpc + proto-google-common-protos + compile + + + com.google.api.grpc + proto-google-iam-v1 + compile + + + diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDataset.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDataset.java new file mode 100644 index 000000000000..1644b8881487 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDataset.java @@ -0,0 +1,2220 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * AnnotatedDataset is a set holding annotations for data in a Dataset. Each
+ * labeling task will generate an AnnotatedDataset under the Dataset that the
+ * task is requested for.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotatedDataset} + */ +public final class AnnotatedDataset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.AnnotatedDataset) + AnnotatedDatasetOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotatedDataset.newBuilder() to construct. + private AnnotatedDataset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotatedDataset() { + name_ = ""; + displayName_ = ""; + description_ = ""; + annotationSource_ = 0; + annotationType_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotatedDataset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + annotationSource_ = rawValue; + break; + } + case 32: + { + exampleCount_ = input.readInt64(); + break; + } + case 40: + { + completedExampleCount_ = input.readInt64(); + break; + } + case 50: + { + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder subBuilder = null; + if (labelStats_ != null) { + subBuilder = labelStats_.toBuilder(); + } + labelStats_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.LabelStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(labelStats_); + labelStats_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 64: + { + int rawValue = input.readEnum(); + + annotationType_ = rawValue; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 82: + { + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.Builder subBuilder = + null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.class, + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only.
+   * AnnotatedDataset resource name in format of:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only.
+   * AnnotatedDataset resource name in format of:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Output only. The display name of the AnnotatedDataset. It is specified in
+   * HumanAnnotationConfig when user starts a labeling task. Maximum of 64
+   * characters.
+   * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The display name of the AnnotatedDataset. It is specified in
+   * HumanAnnotationConfig when user starts a labeling task. Maximum of 64
+   * characters.
+   * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 9; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Output only. The description of the AnnotatedDataset. It is specified in
+   * HumanAnnotationConfig when user starts a labeling task. Maximum of 10000
+   * characters.
+   * 
+ * + * string description = 9; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The description of the AnnotatedDataset. It is specified in
+   * HumanAnnotationConfig when user starts a labeling task. Maximum of 10000
+   * characters.
+   * 
+ * + * string description = 9; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATION_SOURCE_FIELD_NUMBER = 3; + private int annotationSource_; + /** + * + * + *
+   * Output only. Source of the annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 3; + */ + public int getAnnotationSourceValue() { + return annotationSource_; + } + /** + * + * + *
+   * Output only. Source of the annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 3; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSource getAnnotationSource() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.AnnotationSource result = + com.google.cloud.datalabeling.v1beta1.AnnotationSource.valueOf(annotationSource_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSource.UNRECOGNIZED + : result; + } + + public static final int ANNOTATION_TYPE_FIELD_NUMBER = 8; + private int annotationType_; + /** + * + * + *
+   * Output only. Type of the annotation. It is specified when starting labeling
+   * task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 8; + */ + public int getAnnotationTypeValue() { + return annotationType_; + } + /** + * + * + *
+   * Output only. Type of the annotation. It is specified when starting labeling
+   * task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 8; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationType getAnnotationType() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.AnnotationType result = + com.google.cloud.datalabeling.v1beta1.AnnotationType.valueOf(annotationType_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationType.UNRECOGNIZED + : result; + } + + public static final int EXAMPLE_COUNT_FIELD_NUMBER = 4; + private long exampleCount_; + /** + * + * + *
+   * Output only. Number of examples in the annotated dataset.
+   * 
+ * + * int64 example_count = 4; + */ + public long getExampleCount() { + return exampleCount_; + } + + public static final int COMPLETED_EXAMPLE_COUNT_FIELD_NUMBER = 5; + private long completedExampleCount_; + /** + * + * + *
+   * Output only. Number of examples that have annotation in the annotated
+   * dataset.
+   * 
+ * + * int64 completed_example_count = 5; + */ + public long getCompletedExampleCount() { + return completedExampleCount_; + } + + public static final int LABEL_STATS_FIELD_NUMBER = 6; + private com.google.cloud.datalabeling.v1beta1.LabelStats labelStats_; + /** + * + * + *
+   * Output only. Per label statistics.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + public boolean hasLabelStats() { + return labelStats_ != null; + } + /** + * + * + *
+   * Output only. Per label statistics.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + public com.google.cloud.datalabeling.v1beta1.LabelStats getLabelStats() { + return labelStats_ == null + ? com.google.cloud.datalabeling.v1beta1.LabelStats.getDefaultInstance() + : labelStats_; + } + /** + * + * + *
+   * Output only. Per label statistics.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + public com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder getLabelStatsOrBuilder() { + return getLabelStats(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time the AnnotatedDataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time the AnnotatedDataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time the AnnotatedDataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int METADATA_FIELD_NUMBER = 10; + private com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata_; + /** + * + * + *
+   * Output only. Additional information about AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + public boolean hasMetadata() { + return metadata_ != null; + } + /** + * + * + *
+   * Output only. Additional information about AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata getMetadata() { + return metadata_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.getDefaultInstance() + : metadata_; + } + /** + * + * + *
+   * Output only. Additional information about AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadataOrBuilder + getMetadataOrBuilder() { + return getMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (annotationSource_ + != com.google.cloud.datalabeling.v1beta1.AnnotationSource.ANNOTATION_SOURCE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, annotationSource_); + } + if (exampleCount_ != 0L) { + output.writeInt64(4, exampleCount_); + } + if (completedExampleCount_ != 0L) { + output.writeInt64(5, completedExampleCount_); + } + if (labelStats_ != null) { + output.writeMessage(6, getLabelStats()); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (annotationType_ + != com.google.cloud.datalabeling.v1beta1.AnnotationType.ANNOTATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(8, annotationType_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, description_); + } + if (metadata_ != null) { + output.writeMessage(10, getMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (annotationSource_ + != com.google.cloud.datalabeling.v1beta1.AnnotationSource.ANNOTATION_SOURCE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, annotationSource_); + } + if (exampleCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, exampleCount_); + } + if (completedExampleCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, completedExampleCount_); + } + if (labelStats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLabelStats()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (annotationType_ + != com.google.cloud.datalabeling.v1beta1.AnnotationType.ANNOTATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, annotationType_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, description_); + } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getMetadata()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.AnnotatedDataset)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset other = + (com.google.cloud.datalabeling.v1beta1.AnnotatedDataset) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (annotationSource_ != other.annotationSource_) return false; + if (annotationType_ != other.annotationType_) return false; + if (getExampleCount() != other.getExampleCount()) return false; + if (getCompletedExampleCount() != other.getCompletedExampleCount()) return false; + if (hasLabelStats() != other.hasLabelStats()) return false; + if (hasLabelStats()) { + if (!getLabelStats().equals(other.getLabelStats())) return false; + } + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata().equals(other.getMetadata())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + ANNOTATION_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + annotationSource_; + hash = (37 * hash) + ANNOTATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + annotationType_; + hash = (37 * hash) + EXAMPLE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getExampleCount()); + hash = (37 * hash) + COMPLETED_EXAMPLE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCompletedExampleCount()); + if (hasLabelStats()) { + hash = (37 * hash) + LABEL_STATS_FIELD_NUMBER; + hash = (53 * hash) + getLabelStats().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * AnnotatedDataset is a set holding annotations for data in a Dataset. Each
+   * labeling task will generate an AnnotatedDataset under the Dataset that the
+   * task is requested for.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotatedDataset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.AnnotatedDataset) + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.class, + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + annotationSource_ = 0; + + annotationType_ = 0; + + exampleCount_ = 0L; + + completedExampleCount_ = 0L; + + if (labelStatsBuilder_ == null) { + labelStats_ = null; + } else { + labelStats_ = null; + labelStatsBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDataset_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotatedDataset getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotatedDataset build() { + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotatedDataset buildPartial() { + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset result = + new com.google.cloud.datalabeling.v1beta1.AnnotatedDataset(this); + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + result.annotationSource_ = annotationSource_; + result.annotationType_ = annotationType_; + result.exampleCount_ = exampleCount_; + result.completedExampleCount_ = completedExampleCount_; + if (labelStatsBuilder_ == null) { + result.labelStats_ = labelStats_; + } else { + result.labelStats_ = labelStatsBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.AnnotatedDataset) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.AnnotatedDataset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.AnnotatedDataset other) { + if (other == com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.annotationSource_ != 0) { + setAnnotationSourceValue(other.getAnnotationSourceValue()); + } + if (other.annotationType_ != 0) { + setAnnotationTypeValue(other.getAnnotationTypeValue()); + } + if (other.getExampleCount() != 0L) { + setExampleCount(other.getExampleCount()); + } + if (other.getCompletedExampleCount() != 0L) { + setCompletedExampleCount(other.getCompletedExampleCount()); + } + if (other.hasLabelStats()) { + mergeLabelStats(other.getLabelStats()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.AnnotatedDataset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only.
+     * AnnotatedDataset resource name in format of:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only.
+     * AnnotatedDataset resource name in format of:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only.
+     * AnnotatedDataset resource name in format of:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only.
+     * AnnotatedDataset resource name in format of:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only.
+     * AnnotatedDataset resource name in format of:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Output only. The display name of the AnnotatedDataset. It is specified in
+     * HumanAnnotationConfig when user starts a labeling task. Maximum of 64
+     * characters.
+     * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The display name of the AnnotatedDataset. It is specified in
+     * HumanAnnotationConfig when user starts a labeling task. Maximum of 64
+     * characters.
+     * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The display name of the AnnotatedDataset. It is specified in
+     * HumanAnnotationConfig when user starts a labeling task. Maximum of 64
+     * characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The display name of the AnnotatedDataset. It is specified in
+     * HumanAnnotationConfig when user starts a labeling task. Maximum of 64
+     * characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The display name of the AnnotatedDataset. It is specified in
+     * HumanAnnotationConfig when user starts a labeling task. Maximum of 64
+     * characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Output only. The description of the AnnotatedDataset. It is specified in
+     * HumanAnnotationConfig when user starts a labeling task. Maximum of 10000
+     * characters.
+     * 
+ * + * string description = 9; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The description of the AnnotatedDataset. It is specified in
+     * HumanAnnotationConfig when user starts a labeling task. Maximum of 10000
+     * characters.
+     * 
+ * + * string description = 9; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The description of the AnnotatedDataset. It is specified in
+     * HumanAnnotationConfig when user starts a labeling task. Maximum of 10000
+     * characters.
+     * 
+ * + * string description = 9; + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The description of the AnnotatedDataset. It is specified in
+     * HumanAnnotationConfig when user starts a labeling task. Maximum of 10000
+     * characters.
+     * 
+ * + * string description = 9; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The description of the AnnotatedDataset. It is specified in
+     * HumanAnnotationConfig when user starts a labeling task. Maximum of 10000
+     * characters.
+     * 
+ * + * string description = 9; + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private int annotationSource_ = 0; + /** + * + * + *
+     * Output only. Source of the annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 3; + */ + public int getAnnotationSourceValue() { + return annotationSource_; + } + /** + * + * + *
+     * Output only. Source of the annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 3; + */ + public Builder setAnnotationSourceValue(int value) { + annotationSource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Source of the annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 3; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSource getAnnotationSource() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.AnnotationSource result = + com.google.cloud.datalabeling.v1beta1.AnnotationSource.valueOf(annotationSource_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSource.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Source of the annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 3; + */ + public Builder setAnnotationSource( + com.google.cloud.datalabeling.v1beta1.AnnotationSource value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSource_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Source of the annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 3; + */ + public Builder clearAnnotationSource() { + + annotationSource_ = 0; + onChanged(); + return this; + } + + private int annotationType_ = 0; + /** + * + * + *
+     * Output only. Type of the annotation. It is specified when starting labeling
+     * task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 8; + */ + public int getAnnotationTypeValue() { + return annotationType_; + } + /** + * + * + *
+     * Output only. Type of the annotation. It is specified when starting labeling
+     * task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 8; + */ + public Builder setAnnotationTypeValue(int value) { + annotationType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of the annotation. It is specified when starting labeling
+     * task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 8; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationType getAnnotationType() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.AnnotationType result = + com.google.cloud.datalabeling.v1beta1.AnnotationType.valueOf(annotationType_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Type of the annotation. It is specified when starting labeling
+     * task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 8; + */ + public Builder setAnnotationType(com.google.cloud.datalabeling.v1beta1.AnnotationType value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Type of the annotation. It is specified when starting labeling
+     * task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 8; + */ + public Builder clearAnnotationType() { + + annotationType_ = 0; + onChanged(); + return this; + } + + private long exampleCount_; + /** + * + * + *
+     * Output only. Number of examples in the annotated dataset.
+     * 
+ * + * int64 example_count = 4; + */ + public long getExampleCount() { + return exampleCount_; + } + /** + * + * + *
+     * Output only. Number of examples in the annotated dataset.
+     * 
+ * + * int64 example_count = 4; + */ + public Builder setExampleCount(long value) { + + exampleCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of examples in the annotated dataset.
+     * 
+ * + * int64 example_count = 4; + */ + public Builder clearExampleCount() { + + exampleCount_ = 0L; + onChanged(); + return this; + } + + private long completedExampleCount_; + /** + * + * + *
+     * Output only. Number of examples that have annotation in the annotated
+     * dataset.
+     * 
+ * + * int64 completed_example_count = 5; + */ + public long getCompletedExampleCount() { + return completedExampleCount_; + } + /** + * + * + *
+     * Output only. Number of examples that have annotation in the annotated
+     * dataset.
+     * 
+ * + * int64 completed_example_count = 5; + */ + public Builder setCompletedExampleCount(long value) { + + completedExampleCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of examples that have annotation in the annotated
+     * dataset.
+     * 
+ * + * int64 completed_example_count = 5; + */ + public Builder clearCompletedExampleCount() { + + completedExampleCount_ = 0L; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.LabelStats labelStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelStats, + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder, + com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder> + labelStatsBuilder_; + /** + * + * + *
+     * Output only. Per label statistics.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + public boolean hasLabelStats() { + return labelStatsBuilder_ != null || labelStats_ != null; + } + /** + * + * + *
+     * Output only. Per label statistics.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + public com.google.cloud.datalabeling.v1beta1.LabelStats getLabelStats() { + if (labelStatsBuilder_ == null) { + return labelStats_ == null + ? com.google.cloud.datalabeling.v1beta1.LabelStats.getDefaultInstance() + : labelStats_; + } else { + return labelStatsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Per label statistics.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + public Builder setLabelStats(com.google.cloud.datalabeling.v1beta1.LabelStats value) { + if (labelStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + labelStats_ = value; + onChanged(); + } else { + labelStatsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Per label statistics.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + public Builder setLabelStats( + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder builderForValue) { + if (labelStatsBuilder_ == null) { + labelStats_ = builderForValue.build(); + onChanged(); + } else { + labelStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Per label statistics.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + public Builder mergeLabelStats(com.google.cloud.datalabeling.v1beta1.LabelStats value) { + if (labelStatsBuilder_ == null) { + if (labelStats_ != null) { + labelStats_ = + com.google.cloud.datalabeling.v1beta1.LabelStats.newBuilder(labelStats_) + .mergeFrom(value) + .buildPartial(); + } else { + labelStats_ = value; + } + onChanged(); + } else { + labelStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Per label statistics.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + public Builder clearLabelStats() { + if (labelStatsBuilder_ == null) { + labelStats_ = null; + onChanged(); + } else { + labelStats_ = null; + labelStatsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Per label statistics.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + public com.google.cloud.datalabeling.v1beta1.LabelStats.Builder getLabelStatsBuilder() { + + onChanged(); + return getLabelStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Per label statistics.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + public com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder getLabelStatsOrBuilder() { + if (labelStatsBuilder_ != null) { + return labelStatsBuilder_.getMessageOrBuilder(); + } else { + return labelStats_ == null + ? com.google.cloud.datalabeling.v1beta1.LabelStats.getDefaultInstance() + : labelStats_; + } + } + /** + * + * + *
+     * Output only. Per label statistics.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelStats, + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder, + com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder> + getLabelStatsFieldBuilder() { + if (labelStatsBuilder_ == null) { + labelStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelStats, + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder, + com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder>( + getLabelStats(), getParentForChildren(), isClean()); + labelStats_ = null; + } + return labelStatsBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time the AnnotatedDataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time the AnnotatedDataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time the AnnotatedDataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the AnnotatedDataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the AnnotatedDataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the AnnotatedDataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time the AnnotatedDataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the AnnotatedDataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time the AnnotatedDataset was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata, + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadataOrBuilder> + metadataBuilder_; + /** + * + * + *
+     * Output only. Additional information about AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + * + * + *
+     * Output only. Additional information about AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.getDefaultInstance() + : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Additional information about AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + public Builder setMetadata( + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Additional information about AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + public Builder setMetadata( + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Additional information about AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + public Builder mergeMetadata( + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.newBuilder(metadata_) + .mergeFrom(value) + .buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Additional information about AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Additional information about AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.Builder + getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Additional information about AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadataOrBuilder + getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.getDefaultInstance() + : metadata_; + } + } + /** + * + * + *
+     * Output only. Additional information about AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata, + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata, + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadataOrBuilder>( + getMetadata(), getParentForChildren(), isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.AnnotatedDataset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.AnnotatedDataset) + private static final com.google.cloud.datalabeling.v1beta1.AnnotatedDataset DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.AnnotatedDataset(); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDataset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotatedDataset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotatedDataset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotatedDataset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetMetadata.java new file mode 100644 index 000000000000..ebc2ce7e4163 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetMetadata.java @@ -0,0 +1,4066 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Metadata on AnnotatedDataset.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata} + */ +public final class AnnotatedDatasetMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata) + AnnotatedDatasetMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotatedDatasetMetadata.newBuilder() to construct. + private AnnotatedDatasetMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotatedDatasetMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotatedDatasetMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (humanAnnotationConfig_ != null) { + subBuilder = humanAnnotationConfig_.toBuilder(); + } + humanAnnotationConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(humanAnnotationConfig_); + humanAnnotationConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder subBuilder = + null; + if (annotationRequestConfigCase_ == 2) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + annotationRequestConfig_) + .toBuilder(); + } + annotationRequestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + annotationRequestConfig_); + annotationRequestConfig_ = subBuilder.buildPartial(); + } + annotationRequestConfigCase_ = 2; + break; + } + case 26: + { + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder subBuilder = null; + if (annotationRequestConfigCase_ == 3) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) + annotationRequestConfig_) + .toBuilder(); + } + annotationRequestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) + annotationRequestConfig_); + annotationRequestConfig_ = subBuilder.buildPartial(); + } + annotationRequestConfigCase_ = 3; + break; + } + case 34: + { + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder subBuilder = null; + if (annotationRequestConfigCase_ == 4) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.PolylineConfig) + annotationRequestConfig_) + .toBuilder(); + } + annotationRequestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.PolylineConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.PolylineConfig) + annotationRequestConfig_); + annotationRequestConfig_ = subBuilder.buildPartial(); + } + annotationRequestConfigCase_ = 4; + break; + } + case 42: + { + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder subBuilder = null; + if (annotationRequestConfigCase_ == 5) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.SegmentationConfig) + annotationRequestConfig_) + .toBuilder(); + } + annotationRequestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) + annotationRequestConfig_); + annotationRequestConfig_ = subBuilder.buildPartial(); + } + annotationRequestConfigCase_ = 5; + break; + } + case 50: + { + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder subBuilder = + null; + if (annotationRequestConfigCase_ == 6) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + annotationRequestConfig_) + .toBuilder(); + } + annotationRequestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + annotationRequestConfig_); + annotationRequestConfig_ = subBuilder.buildPartial(); + } + annotationRequestConfigCase_ = 6; + break; + } + case 58: + { + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder subBuilder = null; + if (annotationRequestConfigCase_ == 7) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + annotationRequestConfig_) + .toBuilder(); + } + annotationRequestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + annotationRequestConfig_); + annotationRequestConfig_ = subBuilder.buildPartial(); + } + annotationRequestConfigCase_ = 7; + break; + } + case 66: + { + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder subBuilder = null; + if (annotationRequestConfigCase_ == 8) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + annotationRequestConfig_) + .toBuilder(); + } + annotationRequestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + annotationRequestConfig_); + annotationRequestConfig_ = subBuilder.buildPartial(); + } + annotationRequestConfigCase_ = 8; + break; + } + case 74: + { + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder subBuilder = null; + if (annotationRequestConfigCase_ == 9) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.EventConfig) annotationRequestConfig_) + .toBuilder(); + } + annotationRequestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.EventConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.EventConfig) annotationRequestConfig_); + annotationRequestConfig_ = subBuilder.buildPartial(); + } + annotationRequestConfigCase_ = 9; + break; + } + case 82: + { + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder subBuilder = + null; + if (annotationRequestConfigCase_ == 10) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + annotationRequestConfig_) + .toBuilder(); + } + annotationRequestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + annotationRequestConfig_); + annotationRequestConfig_ = subBuilder.buildPartial(); + } + annotationRequestConfigCase_ = 10; + break; + } + case 90: + { + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder subBuilder = + null; + if (annotationRequestConfigCase_ == 11) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + annotationRequestConfig_) + .toBuilder(); + } + annotationRequestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + annotationRequestConfig_); + annotationRequestConfig_ = subBuilder.buildPartial(); + } + annotationRequestConfigCase_ = 11; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDatasetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDatasetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.class, + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.Builder.class); + } + + private int annotationRequestConfigCase_ = 0; + private java.lang.Object annotationRequestConfig_; + + public enum AnnotationRequestConfigCase implements com.google.protobuf.Internal.EnumLite { + IMAGE_CLASSIFICATION_CONFIG(2), + BOUNDING_POLY_CONFIG(3), + POLYLINE_CONFIG(4), + SEGMENTATION_CONFIG(5), + VIDEO_CLASSIFICATION_CONFIG(6), + OBJECT_DETECTION_CONFIG(7), + OBJECT_TRACKING_CONFIG(8), + EVENT_CONFIG(9), + TEXT_CLASSIFICATION_CONFIG(10), + TEXT_ENTITY_EXTRACTION_CONFIG(11), + ANNOTATIONREQUESTCONFIG_NOT_SET(0); + private final int value; + + private AnnotationRequestConfigCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static AnnotationRequestConfigCase valueOf(int value) { + return forNumber(value); + } + + public static AnnotationRequestConfigCase forNumber(int value) { + switch (value) { + case 2: + return IMAGE_CLASSIFICATION_CONFIG; + case 3: + return BOUNDING_POLY_CONFIG; + case 4: + return POLYLINE_CONFIG; + case 5: + return SEGMENTATION_CONFIG; + case 6: + return VIDEO_CLASSIFICATION_CONFIG; + case 7: + return OBJECT_DETECTION_CONFIG; + case 8: + return OBJECT_TRACKING_CONFIG; + case 9: + return EVENT_CONFIG; + case 10: + return TEXT_CLASSIFICATION_CONFIG; + case 11: + return TEXT_ENTITY_EXTRACTION_CONFIG; + case 0: + return ANNOTATIONREQUESTCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AnnotationRequestConfigCase getAnnotationRequestConfigCase() { + return AnnotationRequestConfigCase.forNumber(annotationRequestConfigCase_); + } + + public static final int HUMAN_ANNOTATION_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig humanAnnotationConfig_; + /** + * + * + *
+   * HumanAnnotationConfig used when requesting the human labeling task for this
+   * AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + public boolean hasHumanAnnotationConfig() { + return humanAnnotationConfig_ != null; + } + /** + * + * + *
+   * HumanAnnotationConfig used when requesting the human labeling task for this
+   * AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getHumanAnnotationConfig() { + return humanAnnotationConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : humanAnnotationConfig_; + } + /** + * + * + *
+   * HumanAnnotationConfig used when requesting the human labeling task for this
+   * AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getHumanAnnotationConfigOrBuilder() { + return getHumanAnnotationConfig(); + } + + public static final int IMAGE_CLASSIFICATION_CONFIG_FIELD_NUMBER = 2; + /** + * + * + *
+   * Configuration for image classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + public boolean hasImageClassificationConfig() { + return annotationRequestConfigCase_ == 2; + } + /** + * + * + *
+   * Configuration for image classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig + getImageClassificationConfig() { + if (annotationRequestConfigCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for image classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder + getImageClassificationConfigOrBuilder() { + if (annotationRequestConfigCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } + + public static final int BOUNDING_POLY_CONFIG_FIELD_NUMBER = 3; + /** + * + * + *
+   * Configuration for image bounding box and bounding poly task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + public boolean hasBoundingPolyConfig() { + return annotationRequestConfigCase_ == 3; + } + /** + * + * + *
+   * Configuration for image bounding box and bounding poly task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig getBoundingPolyConfig() { + if (annotationRequestConfigCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for image bounding box and bounding poly task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder + getBoundingPolyConfigOrBuilder() { + if (annotationRequestConfigCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } + + public static final int POLYLINE_CONFIG_FIELD_NUMBER = 4; + /** + * + * + *
+   * Configuration for image polyline task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + public boolean hasPolylineConfig() { + return annotationRequestConfigCase_ == 4; + } + /** + * + * + *
+   * Configuration for image polyline task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + public com.google.cloud.datalabeling.v1beta1.PolylineConfig getPolylineConfig() { + if (annotationRequestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.PolylineConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for image polyline task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + public com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder + getPolylineConfigOrBuilder() { + if (annotationRequestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.PolylineConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } + + public static final int SEGMENTATION_CONFIG_FIELD_NUMBER = 5; + /** + * + * + *
+   * Configuration for image segmentation task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + public boolean hasSegmentationConfig() { + return annotationRequestConfigCase_ == 5; + } + /** + * + * + *
+   * Configuration for image segmentation task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.SegmentationConfig getSegmentationConfig() { + if (annotationRequestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for image segmentation task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder + getSegmentationConfigOrBuilder() { + if (annotationRequestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } + + public static final int VIDEO_CLASSIFICATION_CONFIG_FIELD_NUMBER = 6; + /** + * + * + *
+   * Configuration for video classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + public boolean hasVideoClassificationConfig() { + return annotationRequestConfigCase_ == 6; + } + /** + * + * + *
+   * Configuration for video classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + getVideoClassificationConfig() { + if (annotationRequestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for video classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder + getVideoClassificationConfigOrBuilder() { + if (annotationRequestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } + + public static final int OBJECT_DETECTION_CONFIG_FIELD_NUMBER = 7; + /** + * + * + *
+   * Configuration for video object detection task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + public boolean hasObjectDetectionConfig() { + return annotationRequestConfigCase_ == 7; + } + /** + * + * + *
+   * Configuration for video object detection task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig getObjectDetectionConfig() { + if (annotationRequestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for video object detection task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder + getObjectDetectionConfigOrBuilder() { + if (annotationRequestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } + + public static final int OBJECT_TRACKING_CONFIG_FIELD_NUMBER = 8; + /** + * + * + *
+   * Configuration for video object tracking task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + public boolean hasObjectTrackingConfig() { + return annotationRequestConfigCase_ == 8; + } + /** + * + * + *
+   * Configuration for video object tracking task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig getObjectTrackingConfig() { + if (annotationRequestConfigCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for video object tracking task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder + getObjectTrackingConfigOrBuilder() { + if (annotationRequestConfigCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } + + public static final int EVENT_CONFIG_FIELD_NUMBER = 9; + /** + * + * + *
+   * Configuration for video event labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + public boolean hasEventConfig() { + return annotationRequestConfigCase_ == 9; + } + /** + * + * + *
+   * Configuration for video event labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + public com.google.cloud.datalabeling.v1beta1.EventConfig getEventConfig() { + if (annotationRequestConfigCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.EventConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for video event labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + public com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder getEventConfigOrBuilder() { + if (annotationRequestConfigCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.EventConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } + + public static final int TEXT_CLASSIFICATION_CONFIG_FIELD_NUMBER = 10; + /** + * + * + *
+   * Configuration for text classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + public boolean hasTextClassificationConfig() { + return annotationRequestConfigCase_ == 10; + } + /** + * + * + *
+   * Configuration for text classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfig + getTextClassificationConfig() { + if (annotationRequestConfigCase_ == 10) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for text classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder + getTextClassificationConfigOrBuilder() { + if (annotationRequestConfigCase_ == 10) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } + + public static final int TEXT_ENTITY_EXTRACTION_CONFIG_FIELD_NUMBER = 11; + /** + * + * + *
+   * Configuration for text entity extraction task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + public boolean hasTextEntityExtractionConfig() { + return annotationRequestConfigCase_ == 11; + } + /** + * + * + *
+   * Configuration for text entity extraction task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + getTextEntityExtractionConfig() { + if (annotationRequestConfigCase_ == 11) { + return (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for text entity extraction task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder + getTextEntityExtractionConfigOrBuilder() { + if (annotationRequestConfigCase_ == 11) { + return (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (humanAnnotationConfig_ != null) { + output.writeMessage(1, getHumanAnnotationConfig()); + } + if (annotationRequestConfigCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.datalabeling.v1beta1.PolylineConfig) annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 9) { + output.writeMessage( + 9, (com.google.cloud.datalabeling.v1beta1.EventConfig) annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 10) { + output.writeMessage( + 10, + (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 11) { + output.writeMessage( + 11, + (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + annotationRequestConfig_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (humanAnnotationConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHumanAnnotationConfig()); + } + if (annotationRequestConfigCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.datalabeling.v1beta1.PolylineConfig) annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, + (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.datalabeling.v1beta1.EventConfig) annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, + (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + annotationRequestConfig_); + } + if (annotationRequestConfigCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, + (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + annotationRequestConfig_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata other = + (com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata) obj; + + if (hasHumanAnnotationConfig() != other.hasHumanAnnotationConfig()) return false; + if (hasHumanAnnotationConfig()) { + if (!getHumanAnnotationConfig().equals(other.getHumanAnnotationConfig())) return false; + } + if (!getAnnotationRequestConfigCase().equals(other.getAnnotationRequestConfigCase())) + return false; + switch (annotationRequestConfigCase_) { + case 2: + if (!getImageClassificationConfig().equals(other.getImageClassificationConfig())) + return false; + break; + case 3: + if (!getBoundingPolyConfig().equals(other.getBoundingPolyConfig())) return false; + break; + case 4: + if (!getPolylineConfig().equals(other.getPolylineConfig())) return false; + break; + case 5: + if (!getSegmentationConfig().equals(other.getSegmentationConfig())) return false; + break; + case 6: + if (!getVideoClassificationConfig().equals(other.getVideoClassificationConfig())) + return false; + break; + case 7: + if (!getObjectDetectionConfig().equals(other.getObjectDetectionConfig())) return false; + break; + case 8: + if (!getObjectTrackingConfig().equals(other.getObjectTrackingConfig())) return false; + break; + case 9: + if (!getEventConfig().equals(other.getEventConfig())) return false; + break; + case 10: + if (!getTextClassificationConfig().equals(other.getTextClassificationConfig())) + return false; + break; + case 11: + if (!getTextEntityExtractionConfig().equals(other.getTextEntityExtractionConfig())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasHumanAnnotationConfig()) { + hash = (37 * hash) + HUMAN_ANNOTATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getHumanAnnotationConfig().hashCode(); + } + switch (annotationRequestConfigCase_) { + case 2: + hash = (37 * hash) + IMAGE_CLASSIFICATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getImageClassificationConfig().hashCode(); + break; + case 3: + hash = (37 * hash) + BOUNDING_POLY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPolyConfig().hashCode(); + break; + case 4: + hash = (37 * hash) + POLYLINE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPolylineConfig().hashCode(); + break; + case 5: + hash = (37 * hash) + SEGMENTATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSegmentationConfig().hashCode(); + break; + case 6: + hash = (37 * hash) + VIDEO_CLASSIFICATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVideoClassificationConfig().hashCode(); + break; + case 7: + hash = (37 * hash) + OBJECT_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getObjectDetectionConfig().hashCode(); + break; + case 8: + hash = (37 * hash) + OBJECT_TRACKING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getObjectTrackingConfig().hashCode(); + break; + case 9: + hash = (37 * hash) + EVENT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEventConfig().hashCode(); + break; + case 10: + hash = (37 * hash) + TEXT_CLASSIFICATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTextClassificationConfig().hashCode(); + break; + case 11: + hash = (37 * hash) + TEXT_ENTITY_EXTRACTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTextEntityExtractionConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata on AnnotatedDataset.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata) + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDatasetMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDatasetMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.class, + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (humanAnnotationConfigBuilder_ == null) { + humanAnnotationConfig_ = null; + } else { + humanAnnotationConfig_ = null; + humanAnnotationConfigBuilder_ = null; + } + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDatasetMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata build() { + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata buildPartial() { + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata result = + new com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata(this); + if (humanAnnotationConfigBuilder_ == null) { + result.humanAnnotationConfig_ = humanAnnotationConfig_; + } else { + result.humanAnnotationConfig_ = humanAnnotationConfigBuilder_.build(); + } + if (annotationRequestConfigCase_ == 2) { + if (imageClassificationConfigBuilder_ == null) { + result.annotationRequestConfig_ = annotationRequestConfig_; + } else { + result.annotationRequestConfig_ = imageClassificationConfigBuilder_.build(); + } + } + if (annotationRequestConfigCase_ == 3) { + if (boundingPolyConfigBuilder_ == null) { + result.annotationRequestConfig_ = annotationRequestConfig_; + } else { + result.annotationRequestConfig_ = boundingPolyConfigBuilder_.build(); + } + } + if (annotationRequestConfigCase_ == 4) { + if (polylineConfigBuilder_ == null) { + result.annotationRequestConfig_ = annotationRequestConfig_; + } else { + result.annotationRequestConfig_ = polylineConfigBuilder_.build(); + } + } + if (annotationRequestConfigCase_ == 5) { + if (segmentationConfigBuilder_ == null) { + result.annotationRequestConfig_ = annotationRequestConfig_; + } else { + result.annotationRequestConfig_ = segmentationConfigBuilder_.build(); + } + } + if (annotationRequestConfigCase_ == 6) { + if (videoClassificationConfigBuilder_ == null) { + result.annotationRequestConfig_ = annotationRequestConfig_; + } else { + result.annotationRequestConfig_ = videoClassificationConfigBuilder_.build(); + } + } + if (annotationRequestConfigCase_ == 7) { + if (objectDetectionConfigBuilder_ == null) { + result.annotationRequestConfig_ = annotationRequestConfig_; + } else { + result.annotationRequestConfig_ = objectDetectionConfigBuilder_.build(); + } + } + if (annotationRequestConfigCase_ == 8) { + if (objectTrackingConfigBuilder_ == null) { + result.annotationRequestConfig_ = annotationRequestConfig_; + } else { + result.annotationRequestConfig_ = objectTrackingConfigBuilder_.build(); + } + } + if (annotationRequestConfigCase_ == 9) { + if (eventConfigBuilder_ == null) { + result.annotationRequestConfig_ = annotationRequestConfig_; + } else { + result.annotationRequestConfig_ = eventConfigBuilder_.build(); + } + } + if (annotationRequestConfigCase_ == 10) { + if (textClassificationConfigBuilder_ == null) { + result.annotationRequestConfig_ = annotationRequestConfig_; + } else { + result.annotationRequestConfig_ = textClassificationConfigBuilder_.build(); + } + } + if (annotationRequestConfigCase_ == 11) { + if (textEntityExtractionConfigBuilder_ == null) { + result.annotationRequestConfig_ = annotationRequestConfig_; + } else { + result.annotationRequestConfig_ = textEntityExtractionConfigBuilder_.build(); + } + } + result.annotationRequestConfigCase_ = annotationRequestConfigCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.getDefaultInstance()) + return this; + if (other.hasHumanAnnotationConfig()) { + mergeHumanAnnotationConfig(other.getHumanAnnotationConfig()); + } + switch (other.getAnnotationRequestConfigCase()) { + case IMAGE_CLASSIFICATION_CONFIG: + { + mergeImageClassificationConfig(other.getImageClassificationConfig()); + break; + } + case BOUNDING_POLY_CONFIG: + { + mergeBoundingPolyConfig(other.getBoundingPolyConfig()); + break; + } + case POLYLINE_CONFIG: + { + mergePolylineConfig(other.getPolylineConfig()); + break; + } + case SEGMENTATION_CONFIG: + { + mergeSegmentationConfig(other.getSegmentationConfig()); + break; + } + case VIDEO_CLASSIFICATION_CONFIG: + { + mergeVideoClassificationConfig(other.getVideoClassificationConfig()); + break; + } + case OBJECT_DETECTION_CONFIG: + { + mergeObjectDetectionConfig(other.getObjectDetectionConfig()); + break; + } + case OBJECT_TRACKING_CONFIG: + { + mergeObjectTrackingConfig(other.getObjectTrackingConfig()); + break; + } + case EVENT_CONFIG: + { + mergeEventConfig(other.getEventConfig()); + break; + } + case TEXT_CLASSIFICATION_CONFIG: + { + mergeTextClassificationConfig(other.getTextClassificationConfig()); + break; + } + case TEXT_ENTITY_EXTRACTION_CONFIG: + { + mergeTextEntityExtractionConfig(other.getTextEntityExtractionConfig()); + break; + } + case ANNOTATIONREQUESTCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int annotationRequestConfigCase_ = 0; + private java.lang.Object annotationRequestConfig_; + + public AnnotationRequestConfigCase getAnnotationRequestConfigCase() { + return AnnotationRequestConfigCase.forNumber(annotationRequestConfigCase_); + } + + public Builder clearAnnotationRequestConfig() { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig humanAnnotationConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + humanAnnotationConfigBuilder_; + /** + * + * + *
+     * HumanAnnotationConfig used when requesting the human labeling task for this
+     * AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + public boolean hasHumanAnnotationConfig() { + return humanAnnotationConfigBuilder_ != null || humanAnnotationConfig_ != null; + } + /** + * + * + *
+     * HumanAnnotationConfig used when requesting the human labeling task for this
+     * AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getHumanAnnotationConfig() { + if (humanAnnotationConfigBuilder_ == null) { + return humanAnnotationConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : humanAnnotationConfig_; + } else { + return humanAnnotationConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * HumanAnnotationConfig used when requesting the human labeling task for this
+     * AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + public Builder setHumanAnnotationConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (humanAnnotationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + humanAnnotationConfig_ = value; + onChanged(); + } else { + humanAnnotationConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * HumanAnnotationConfig used when requesting the human labeling task for this
+     * AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + public Builder setHumanAnnotationConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (humanAnnotationConfigBuilder_ == null) { + humanAnnotationConfig_ = builderForValue.build(); + onChanged(); + } else { + humanAnnotationConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * HumanAnnotationConfig used when requesting the human labeling task for this
+     * AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + public Builder mergeHumanAnnotationConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (humanAnnotationConfigBuilder_ == null) { + if (humanAnnotationConfig_ != null) { + humanAnnotationConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder( + humanAnnotationConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + humanAnnotationConfig_ = value; + } + onChanged(); + } else { + humanAnnotationConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * HumanAnnotationConfig used when requesting the human labeling task for this
+     * AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + public Builder clearHumanAnnotationConfig() { + if (humanAnnotationConfigBuilder_ == null) { + humanAnnotationConfig_ = null; + onChanged(); + } else { + humanAnnotationConfig_ = null; + humanAnnotationConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * HumanAnnotationConfig used when requesting the human labeling task for this
+     * AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getHumanAnnotationConfigBuilder() { + + onChanged(); + return getHumanAnnotationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * HumanAnnotationConfig used when requesting the human labeling task for this
+     * AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getHumanAnnotationConfigOrBuilder() { + if (humanAnnotationConfigBuilder_ != null) { + return humanAnnotationConfigBuilder_.getMessageOrBuilder(); + } else { + return humanAnnotationConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : humanAnnotationConfig_; + } + } + /** + * + * + *
+     * HumanAnnotationConfig used when requesting the human labeling task for this
+     * AnnotatedDataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getHumanAnnotationConfigFieldBuilder() { + if (humanAnnotationConfigBuilder_ == null) { + humanAnnotationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getHumanAnnotationConfig(), getParentForChildren(), isClean()); + humanAnnotationConfig_ = null; + } + return humanAnnotationConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder> + imageClassificationConfigBuilder_; + /** + * + * + *
+     * Configuration for image classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + public boolean hasImageClassificationConfig() { + return annotationRequestConfigCase_ == 2; + } + /** + * + * + *
+     * Configuration for image classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig + getImageClassificationConfig() { + if (imageClassificationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } else { + if (annotationRequestConfigCase_ == 2) { + return imageClassificationConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for image classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + public Builder setImageClassificationConfig( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig value) { + if (imageClassificationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationRequestConfig_ = value; + onChanged(); + } else { + imageClassificationConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Configuration for image classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + public Builder setImageClassificationConfig( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder builderForValue) { + if (imageClassificationConfigBuilder_ == null) { + annotationRequestConfig_ = builderForValue.build(); + onChanged(); + } else { + imageClassificationConfigBuilder_.setMessage(builderForValue.build()); + } + annotationRequestConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Configuration for image classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + public Builder mergeImageClassificationConfig( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig value) { + if (imageClassificationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 2 + && annotationRequestConfig_ + != com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig + .getDefaultInstance()) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + annotationRequestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationRequestConfig_ = value; + } + onChanged(); + } else { + if (annotationRequestConfigCase_ == 2) { + imageClassificationConfigBuilder_.mergeFrom(value); + } + imageClassificationConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 2; + return this; + } + /** + * + * + *
+     * Configuration for image classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + public Builder clearImageClassificationConfig() { + if (imageClassificationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 2) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + onChanged(); + } + } else { + if (annotationRequestConfigCase_ == 2) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + } + imageClassificationConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for image classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder + getImageClassificationConfigBuilder() { + return getImageClassificationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for image classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder + getImageClassificationConfigOrBuilder() { + if ((annotationRequestConfigCase_ == 2) && (imageClassificationConfigBuilder_ != null)) { + return imageClassificationConfigBuilder_.getMessageOrBuilder(); + } else { + if (annotationRequestConfigCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for image classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder> + getImageClassificationConfigFieldBuilder() { + if (imageClassificationConfigBuilder_ == null) { + if (!(annotationRequestConfigCase_ == 2)) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } + imageClassificationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + annotationRequestConfig_, + getParentForChildren(), + isClean()); + annotationRequestConfig_ = null; + } + annotationRequestConfigCase_ = 2; + onChanged(); + ; + return imageClassificationConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder> + boundingPolyConfigBuilder_; + /** + * + * + *
+     * Configuration for image bounding box and bounding poly task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + public boolean hasBoundingPolyConfig() { + return annotationRequestConfigCase_ == 3; + } + /** + * + * + *
+     * Configuration for image bounding box and bounding poly task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig getBoundingPolyConfig() { + if (boundingPolyConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } else { + if (annotationRequestConfigCase_ == 3) { + return boundingPolyConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for image bounding box and bounding poly task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + public Builder setBoundingPolyConfig( + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig value) { + if (boundingPolyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationRequestConfig_ = value; + onChanged(); + } else { + boundingPolyConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 3; + return this; + } + /** + * + * + *
+     * Configuration for image bounding box and bounding poly task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + public Builder setBoundingPolyConfig( + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder builderForValue) { + if (boundingPolyConfigBuilder_ == null) { + annotationRequestConfig_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyConfigBuilder_.setMessage(builderForValue.build()); + } + annotationRequestConfigCase_ = 3; + return this; + } + /** + * + * + *
+     * Configuration for image bounding box and bounding poly task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + public Builder mergeBoundingPolyConfig( + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig value) { + if (boundingPolyConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 3 + && annotationRequestConfig_ + != com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance()) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) + annotationRequestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationRequestConfig_ = value; + } + onChanged(); + } else { + if (annotationRequestConfigCase_ == 3) { + boundingPolyConfigBuilder_.mergeFrom(value); + } + boundingPolyConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 3; + return this; + } + /** + * + * + *
+     * Configuration for image bounding box and bounding poly task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + public Builder clearBoundingPolyConfig() { + if (boundingPolyConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 3) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + onChanged(); + } + } else { + if (annotationRequestConfigCase_ == 3) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + } + boundingPolyConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for image bounding box and bounding poly task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder + getBoundingPolyConfigBuilder() { + return getBoundingPolyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for image bounding box and bounding poly task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder + getBoundingPolyConfigOrBuilder() { + if ((annotationRequestConfigCase_ == 3) && (boundingPolyConfigBuilder_ != null)) { + return boundingPolyConfigBuilder_.getMessageOrBuilder(); + } else { + if (annotationRequestConfigCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for image bounding box and bounding poly task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder> + getBoundingPolyConfigFieldBuilder() { + if (boundingPolyConfigBuilder_ == null) { + if (!(annotationRequestConfigCase_ == 3)) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } + boundingPolyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) annotationRequestConfig_, + getParentForChildren(), + isClean()); + annotationRequestConfig_ = null; + } + annotationRequestConfigCase_ = 3; + onChanged(); + ; + return boundingPolyConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.PolylineConfig, + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder, + com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder> + polylineConfigBuilder_; + /** + * + * + *
+     * Configuration for image polyline task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + public boolean hasPolylineConfig() { + return annotationRequestConfigCase_ == 4; + } + /** + * + * + *
+     * Configuration for image polyline task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + public com.google.cloud.datalabeling.v1beta1.PolylineConfig getPolylineConfig() { + if (polylineConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.PolylineConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } else { + if (annotationRequestConfigCase_ == 4) { + return polylineConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for image polyline task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + public Builder setPolylineConfig(com.google.cloud.datalabeling.v1beta1.PolylineConfig value) { + if (polylineConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationRequestConfig_ = value; + onChanged(); + } else { + polylineConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for image polyline task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + public Builder setPolylineConfig( + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder builderForValue) { + if (polylineConfigBuilder_ == null) { + annotationRequestConfig_ = builderForValue.build(); + onChanged(); + } else { + polylineConfigBuilder_.setMessage(builderForValue.build()); + } + annotationRequestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for image polyline task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + public Builder mergePolylineConfig(com.google.cloud.datalabeling.v1beta1.PolylineConfig value) { + if (polylineConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 4 + && annotationRequestConfig_ + != com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance()) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.PolylineConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.PolylineConfig) + annotationRequestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationRequestConfig_ = value; + } + onChanged(); + } else { + if (annotationRequestConfigCase_ == 4) { + polylineConfigBuilder_.mergeFrom(value); + } + polylineConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for image polyline task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + public Builder clearPolylineConfig() { + if (polylineConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 4) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + onChanged(); + } + } else { + if (annotationRequestConfigCase_ == 4) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + } + polylineConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for image polyline task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + public com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder getPolylineConfigBuilder() { + return getPolylineConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for image polyline task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + public com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder + getPolylineConfigOrBuilder() { + if ((annotationRequestConfigCase_ == 4) && (polylineConfigBuilder_ != null)) { + return polylineConfigBuilder_.getMessageOrBuilder(); + } else { + if (annotationRequestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.PolylineConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for image polyline task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.PolylineConfig, + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder, + com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder> + getPolylineConfigFieldBuilder() { + if (polylineConfigBuilder_ == null) { + if (!(annotationRequestConfigCase_ == 4)) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } + polylineConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.PolylineConfig, + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder, + com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.PolylineConfig) annotationRequestConfig_, + getParentForChildren(), + isClean()); + annotationRequestConfig_ = null; + } + annotationRequestConfigCase_ = 4; + onChanged(); + ; + return polylineConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.SegmentationConfig, + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder> + segmentationConfigBuilder_; + /** + * + * + *
+     * Configuration for image segmentation task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + public boolean hasSegmentationConfig() { + return annotationRequestConfigCase_ == 5; + } + /** + * + * + *
+     * Configuration for image segmentation task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.SegmentationConfig getSegmentationConfig() { + if (segmentationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } else { + if (annotationRequestConfigCase_ == 5) { + return segmentationConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for image segmentation task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + public Builder setSegmentationConfig( + com.google.cloud.datalabeling.v1beta1.SegmentationConfig value) { + if (segmentationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationRequestConfig_ = value; + onChanged(); + } else { + segmentationConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for image segmentation task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + public Builder setSegmentationConfig( + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder builderForValue) { + if (segmentationConfigBuilder_ == null) { + annotationRequestConfig_ = builderForValue.build(); + onChanged(); + } else { + segmentationConfigBuilder_.setMessage(builderForValue.build()); + } + annotationRequestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for image segmentation task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + public Builder mergeSegmentationConfig( + com.google.cloud.datalabeling.v1beta1.SegmentationConfig value) { + if (segmentationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 5 + && annotationRequestConfig_ + != com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance()) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) + annotationRequestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationRequestConfig_ = value; + } + onChanged(); + } else { + if (annotationRequestConfigCase_ == 5) { + segmentationConfigBuilder_.mergeFrom(value); + } + segmentationConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for image segmentation task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + public Builder clearSegmentationConfig() { + if (segmentationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 5) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + onChanged(); + } + } else { + if (annotationRequestConfigCase_ == 5) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + } + segmentationConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for image segmentation task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder + getSegmentationConfigBuilder() { + return getSegmentationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for image segmentation task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder + getSegmentationConfigOrBuilder() { + if ((annotationRequestConfigCase_ == 5) && (segmentationConfigBuilder_ != null)) { + return segmentationConfigBuilder_.getMessageOrBuilder(); + } else { + if (annotationRequestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for image segmentation task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.SegmentationConfig, + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder> + getSegmentationConfigFieldBuilder() { + if (segmentationConfigBuilder_ == null) { + if (!(annotationRequestConfigCase_ == 5)) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } + segmentationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.SegmentationConfig, + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) annotationRequestConfig_, + getParentForChildren(), + isClean()); + annotationRequestConfig_ = null; + } + annotationRequestConfigCase_ = 5; + onChanged(); + ; + return segmentationConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder> + videoClassificationConfigBuilder_; + /** + * + * + *
+     * Configuration for video classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + public boolean hasVideoClassificationConfig() { + return annotationRequestConfigCase_ == 6; + } + /** + * + * + *
+     * Configuration for video classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + getVideoClassificationConfig() { + if (videoClassificationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } else { + if (annotationRequestConfigCase_ == 6) { + return videoClassificationConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + public Builder setVideoClassificationConfig( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig value) { + if (videoClassificationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationRequestConfig_ = value; + onChanged(); + } else { + videoClassificationConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Configuration for video classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + public Builder setVideoClassificationConfig( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder builderForValue) { + if (videoClassificationConfigBuilder_ == null) { + annotationRequestConfig_ = builderForValue.build(); + onChanged(); + } else { + videoClassificationConfigBuilder_.setMessage(builderForValue.build()); + } + annotationRequestConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Configuration for video classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + public Builder mergeVideoClassificationConfig( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig value) { + if (videoClassificationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 6 + && annotationRequestConfig_ + != com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .getDefaultInstance()) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + annotationRequestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationRequestConfig_ = value; + } + onChanged(); + } else { + if (annotationRequestConfigCase_ == 6) { + videoClassificationConfigBuilder_.mergeFrom(value); + } + videoClassificationConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Configuration for video classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + public Builder clearVideoClassificationConfig() { + if (videoClassificationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 6) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + onChanged(); + } + } else { + if (annotationRequestConfigCase_ == 6) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + } + videoClassificationConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for video classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder + getVideoClassificationConfigBuilder() { + return getVideoClassificationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for video classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder + getVideoClassificationConfigOrBuilder() { + if ((annotationRequestConfigCase_ == 6) && (videoClassificationConfigBuilder_ != null)) { + return videoClassificationConfigBuilder_.getMessageOrBuilder(); + } else { + if (annotationRequestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder> + getVideoClassificationConfigFieldBuilder() { + if (videoClassificationConfigBuilder_ == null) { + if (!(annotationRequestConfigCase_ == 6)) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } + videoClassificationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + annotationRequestConfig_, + getParentForChildren(), + isClean()); + annotationRequestConfig_ = null; + } + annotationRequestConfigCase_ = 6; + onChanged(); + ; + return videoClassificationConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder> + objectDetectionConfigBuilder_; + /** + * + * + *
+     * Configuration for video object detection task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + public boolean hasObjectDetectionConfig() { + return annotationRequestConfigCase_ == 7; + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig getObjectDetectionConfig() { + if (objectDetectionConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } else { + if (annotationRequestConfigCase_ == 7) { + return objectDetectionConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + public Builder setObjectDetectionConfig( + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig value) { + if (objectDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationRequestConfig_ = value; + onChanged(); + } else { + objectDetectionConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + public Builder setObjectDetectionConfig( + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder builderForValue) { + if (objectDetectionConfigBuilder_ == null) { + annotationRequestConfig_ = builderForValue.build(); + onChanged(); + } else { + objectDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + annotationRequestConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + public Builder mergeObjectDetectionConfig( + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig value) { + if (objectDetectionConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 7 + && annotationRequestConfig_ + != com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig + .getDefaultInstance()) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + annotationRequestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationRequestConfig_ = value; + } + onChanged(); + } else { + if (annotationRequestConfigCase_ == 7) { + objectDetectionConfigBuilder_.mergeFrom(value); + } + objectDetectionConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + public Builder clearObjectDetectionConfig() { + if (objectDetectionConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 7) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + onChanged(); + } + } else { + if (annotationRequestConfigCase_ == 7) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + } + objectDetectionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder + getObjectDetectionConfigBuilder() { + return getObjectDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder + getObjectDetectionConfigOrBuilder() { + if ((annotationRequestConfigCase_ == 7) && (objectDetectionConfigBuilder_ != null)) { + return objectDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + if (annotationRequestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder> + getObjectDetectionConfigFieldBuilder() { + if (objectDetectionConfigBuilder_ == null) { + if (!(annotationRequestConfigCase_ == 7)) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } + objectDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + annotationRequestConfig_, + getParentForChildren(), + isClean()); + annotationRequestConfig_ = null; + } + annotationRequestConfigCase_ = 7; + onChanged(); + ; + return objectDetectionConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder> + objectTrackingConfigBuilder_; + /** + * + * + *
+     * Configuration for video object tracking task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + public boolean hasObjectTrackingConfig() { + return annotationRequestConfigCase_ == 8; + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig getObjectTrackingConfig() { + if (objectTrackingConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } else { + if (annotationRequestConfigCase_ == 8) { + return objectTrackingConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + public Builder setObjectTrackingConfig( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig value) { + if (objectTrackingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationRequestConfig_ = value; + onChanged(); + } else { + objectTrackingConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 8; + return this; + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + public Builder setObjectTrackingConfig( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder builderForValue) { + if (objectTrackingConfigBuilder_ == null) { + annotationRequestConfig_ = builderForValue.build(); + onChanged(); + } else { + objectTrackingConfigBuilder_.setMessage(builderForValue.build()); + } + annotationRequestConfigCase_ = 8; + return this; + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + public Builder mergeObjectTrackingConfig( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig value) { + if (objectTrackingConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 8 + && annotationRequestConfig_ + != com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig + .getDefaultInstance()) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + annotationRequestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationRequestConfig_ = value; + } + onChanged(); + } else { + if (annotationRequestConfigCase_ == 8) { + objectTrackingConfigBuilder_.mergeFrom(value); + } + objectTrackingConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 8; + return this; + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + public Builder clearObjectTrackingConfig() { + if (objectTrackingConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 8) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + onChanged(); + } + } else { + if (annotationRequestConfigCase_ == 8) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + } + objectTrackingConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder + getObjectTrackingConfigBuilder() { + return getObjectTrackingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder + getObjectTrackingConfigOrBuilder() { + if ((annotationRequestConfigCase_ == 8) && (objectTrackingConfigBuilder_ != null)) { + return objectTrackingConfigBuilder_.getMessageOrBuilder(); + } else { + if (annotationRequestConfigCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder> + getObjectTrackingConfigFieldBuilder() { + if (objectTrackingConfigBuilder_ == null) { + if (!(annotationRequestConfigCase_ == 8)) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } + objectTrackingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + annotationRequestConfig_, + getParentForChildren(), + isClean()); + annotationRequestConfig_ = null; + } + annotationRequestConfigCase_ = 8; + onChanged(); + ; + return objectTrackingConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.EventConfig, + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder, + com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder> + eventConfigBuilder_; + /** + * + * + *
+     * Configuration for video event labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + public boolean hasEventConfig() { + return annotationRequestConfigCase_ == 9; + } + /** + * + * + *
+     * Configuration for video event labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + public com.google.cloud.datalabeling.v1beta1.EventConfig getEventConfig() { + if (eventConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.EventConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } else { + if (annotationRequestConfigCase_ == 9) { + return eventConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video event labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + public Builder setEventConfig(com.google.cloud.datalabeling.v1beta1.EventConfig value) { + if (eventConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationRequestConfig_ = value; + onChanged(); + } else { + eventConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 9; + return this; + } + /** + * + * + *
+     * Configuration for video event labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + public Builder setEventConfig( + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder builderForValue) { + if (eventConfigBuilder_ == null) { + annotationRequestConfig_ = builderForValue.build(); + onChanged(); + } else { + eventConfigBuilder_.setMessage(builderForValue.build()); + } + annotationRequestConfigCase_ = 9; + return this; + } + /** + * + * + *
+     * Configuration for video event labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + public Builder mergeEventConfig(com.google.cloud.datalabeling.v1beta1.EventConfig value) { + if (eventConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 9 + && annotationRequestConfig_ + != com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance()) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.EventConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.EventConfig) annotationRequestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationRequestConfig_ = value; + } + onChanged(); + } else { + if (annotationRequestConfigCase_ == 9) { + eventConfigBuilder_.mergeFrom(value); + } + eventConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 9; + return this; + } + /** + * + * + *
+     * Configuration for video event labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + public Builder clearEventConfig() { + if (eventConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 9) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + onChanged(); + } + } else { + if (annotationRequestConfigCase_ == 9) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + } + eventConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for video event labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + public com.google.cloud.datalabeling.v1beta1.EventConfig.Builder getEventConfigBuilder() { + return getEventConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for video event labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + public com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder getEventConfigOrBuilder() { + if ((annotationRequestConfigCase_ == 9) && (eventConfigBuilder_ != null)) { + return eventConfigBuilder_.getMessageOrBuilder(); + } else { + if (annotationRequestConfigCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.EventConfig) annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video event labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.EventConfig, + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder, + com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder> + getEventConfigFieldBuilder() { + if (eventConfigBuilder_ == null) { + if (!(annotationRequestConfigCase_ == 9)) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } + eventConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.EventConfig, + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder, + com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.EventConfig) annotationRequestConfig_, + getParentForChildren(), + isClean()); + annotationRequestConfig_ = null; + } + annotationRequestConfigCase_ = 9; + onChanged(); + ; + return eventConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder> + textClassificationConfigBuilder_; + /** + * + * + *
+     * Configuration for text classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + public boolean hasTextClassificationConfig() { + return annotationRequestConfigCase_ == 10; + } + /** + * + * + *
+     * Configuration for text classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfig + getTextClassificationConfig() { + if (textClassificationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 10) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } else { + if (annotationRequestConfigCase_ == 10) { + return textClassificationConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for text classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + public Builder setTextClassificationConfig( + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig value) { + if (textClassificationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationRequestConfig_ = value; + onChanged(); + } else { + textClassificationConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 10; + return this; + } + /** + * + * + *
+     * Configuration for text classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + public Builder setTextClassificationConfig( + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder builderForValue) { + if (textClassificationConfigBuilder_ == null) { + annotationRequestConfig_ = builderForValue.build(); + onChanged(); + } else { + textClassificationConfigBuilder_.setMessage(builderForValue.build()); + } + annotationRequestConfigCase_ = 10; + return this; + } + /** + * + * + *
+     * Configuration for text classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + public Builder mergeTextClassificationConfig( + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig value) { + if (textClassificationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 10 + && annotationRequestConfig_ + != com.google.cloud.datalabeling.v1beta1.TextClassificationConfig + .getDefaultInstance()) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + annotationRequestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationRequestConfig_ = value; + } + onChanged(); + } else { + if (annotationRequestConfigCase_ == 10) { + textClassificationConfigBuilder_.mergeFrom(value); + } + textClassificationConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 10; + return this; + } + /** + * + * + *
+     * Configuration for text classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + public Builder clearTextClassificationConfig() { + if (textClassificationConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 10) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + onChanged(); + } + } else { + if (annotationRequestConfigCase_ == 10) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + } + textClassificationConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for text classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder + getTextClassificationConfigBuilder() { + return getTextClassificationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for text classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder + getTextClassificationConfigOrBuilder() { + if ((annotationRequestConfigCase_ == 10) && (textClassificationConfigBuilder_ != null)) { + return textClassificationConfigBuilder_.getMessageOrBuilder(); + } else { + if (annotationRequestConfigCase_ == 10) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for text classification task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder> + getTextClassificationConfigFieldBuilder() { + if (textClassificationConfigBuilder_ == null) { + if (!(annotationRequestConfigCase_ == 10)) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } + textClassificationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + annotationRequestConfig_, + getParentForChildren(), + isClean()); + annotationRequestConfig_ = null; + } + annotationRequestConfigCase_ = 10; + onChanged(); + ; + return textClassificationConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder> + textEntityExtractionConfigBuilder_; + /** + * + * + *
+     * Configuration for text entity extraction task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + public boolean hasTextEntityExtractionConfig() { + return annotationRequestConfigCase_ == 11; + } + /** + * + * + *
+     * Configuration for text entity extraction task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + getTextEntityExtractionConfig() { + if (textEntityExtractionConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 11) { + return (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + .getDefaultInstance(); + } else { + if (annotationRequestConfigCase_ == 11) { + return textEntityExtractionConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for text entity extraction task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + public Builder setTextEntityExtractionConfig( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig value) { + if (textEntityExtractionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationRequestConfig_ = value; + onChanged(); + } else { + textEntityExtractionConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 11; + return this; + } + /** + * + * + *
+     * Configuration for text entity extraction task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + public Builder setTextEntityExtractionConfig( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder builderForValue) { + if (textEntityExtractionConfigBuilder_ == null) { + annotationRequestConfig_ = builderForValue.build(); + onChanged(); + } else { + textEntityExtractionConfigBuilder_.setMessage(builderForValue.build()); + } + annotationRequestConfigCase_ = 11; + return this; + } + /** + * + * + *
+     * Configuration for text entity extraction task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + public Builder mergeTextEntityExtractionConfig( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig value) { + if (textEntityExtractionConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 11 + && annotationRequestConfig_ + != com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + .getDefaultInstance()) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + annotationRequestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationRequestConfig_ = value; + } + onChanged(); + } else { + if (annotationRequestConfigCase_ == 11) { + textEntityExtractionConfigBuilder_.mergeFrom(value); + } + textEntityExtractionConfigBuilder_.setMessage(value); + } + annotationRequestConfigCase_ = 11; + return this; + } + /** + * + * + *
+     * Configuration for text entity extraction task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + public Builder clearTextEntityExtractionConfig() { + if (textEntityExtractionConfigBuilder_ == null) { + if (annotationRequestConfigCase_ == 11) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + onChanged(); + } + } else { + if (annotationRequestConfigCase_ == 11) { + annotationRequestConfigCase_ = 0; + annotationRequestConfig_ = null; + } + textEntityExtractionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for text entity extraction task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder + getTextEntityExtractionConfigBuilder() { + return getTextEntityExtractionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for text entity extraction task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder + getTextEntityExtractionConfigOrBuilder() { + if ((annotationRequestConfigCase_ == 11) && (textEntityExtractionConfigBuilder_ != null)) { + return textEntityExtractionConfigBuilder_.getMessageOrBuilder(); + } else { + if (annotationRequestConfigCase_ == 11) { + return (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + annotationRequestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for text entity extraction task.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder> + getTextEntityExtractionConfigFieldBuilder() { + if (textEntityExtractionConfigBuilder_ == null) { + if (!(annotationRequestConfigCase_ == 11)) { + annotationRequestConfig_ = + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.getDefaultInstance(); + } + textEntityExtractionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + annotationRequestConfig_, + getParentForChildren(), + isClean()); + annotationRequestConfig_ = null; + } + annotationRequestConfigCase_ = 11; + onChanged(); + ; + return textEntityExtractionConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata) + private static final com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotatedDatasetMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotatedDatasetMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetMetadataOrBuilder.java new file mode 100644 index 000000000000..1222a0c1d2f9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetMetadataOrBuilder.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface AnnotatedDatasetMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * HumanAnnotationConfig used when requesting the human labeling task for this
+   * AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + boolean hasHumanAnnotationConfig(); + /** + * + * + *
+   * HumanAnnotationConfig used when requesting the human labeling task for this
+   * AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getHumanAnnotationConfig(); + /** + * + * + *
+   * HumanAnnotationConfig used when requesting the human labeling task for this
+   * AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig human_annotation_config = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getHumanAnnotationConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for image classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + boolean hasImageClassificationConfig(); + /** + * + * + *
+   * Configuration for image classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig getImageClassificationConfig(); + /** + * + * + *
+   * Configuration for image classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 2; + * + */ + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder + getImageClassificationConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for image bounding box and bounding poly task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + boolean hasBoundingPolyConfig(); + /** + * + * + *
+   * Configuration for image bounding box and bounding poly task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig getBoundingPolyConfig(); + /** + * + * + *
+   * Configuration for image bounding box and bounding poly task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 3; + */ + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder + getBoundingPolyConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for image polyline task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + boolean hasPolylineConfig(); + /** + * + * + *
+   * Configuration for image polyline task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + com.google.cloud.datalabeling.v1beta1.PolylineConfig getPolylineConfig(); + /** + * + * + *
+   * Configuration for image polyline task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 4; + */ + com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder getPolylineConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for image segmentation task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + boolean hasSegmentationConfig(); + /** + * + * + *
+   * Configuration for image segmentation task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + com.google.cloud.datalabeling.v1beta1.SegmentationConfig getSegmentationConfig(); + /** + * + * + *
+   * Configuration for image segmentation task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 5; + */ + com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder + getSegmentationConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for video classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + boolean hasVideoClassificationConfig(); + /** + * + * + *
+   * Configuration for video classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig getVideoClassificationConfig(); + /** + * + * + *
+   * Configuration for video classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 6; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder + getVideoClassificationConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for video object detection task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + boolean hasObjectDetectionConfig(); + /** + * + * + *
+   * Configuration for video object detection task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig getObjectDetectionConfig(); + /** + * + * + *
+   * Configuration for video object detection task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 7; + * + */ + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder + getObjectDetectionConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for video object tracking task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + boolean hasObjectTrackingConfig(); + /** + * + * + *
+   * Configuration for video object tracking task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig getObjectTrackingConfig(); + /** + * + * + *
+   * Configuration for video object tracking task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 8; + * + */ + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder + getObjectTrackingConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for video event labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + boolean hasEventConfig(); + /** + * + * + *
+   * Configuration for video event labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + com.google.cloud.datalabeling.v1beta1.EventConfig getEventConfig(); + /** + * + * + *
+   * Configuration for video event labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 9; + */ + com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder getEventConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for text classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + boolean hasTextClassificationConfig(); + /** + * + * + *
+   * Configuration for text classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig getTextClassificationConfig(); + /** + * + * + *
+   * Configuration for text classification task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 10; + * + */ + com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder + getTextClassificationConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for text entity extraction task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + boolean hasTextEntityExtractionConfig(); + /** + * + * + *
+   * Configuration for text entity extraction task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig getTextEntityExtractionConfig(); + /** + * + * + *
+   * Configuration for text entity extraction task.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 11; + * + */ + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder + getTextEntityExtractionConfigOrBuilder(); + + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata.AnnotationRequestConfigCase + getAnnotationRequestConfigCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetName.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetName.java new file mode 100644 index 000000000000..e907d3b688ad --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetName.java @@ -0,0 +1,213 @@ +/* + * 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.datalabeling.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 AnnotatedDatasetName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String dataset; + private final String annotatedDataset; + + public String getProject() { + return project; + } + + public String getDataset() { + return dataset; + } + + public String getAnnotatedDataset() { + return annotatedDataset; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private AnnotatedDatasetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + annotatedDataset = Preconditions.checkNotNull(builder.getAnnotatedDataset()); + } + + public static AnnotatedDatasetName of(String project, String dataset, String annotatedDataset) { + return newBuilder() + .setProject(project) + .setDataset(dataset) + .setAnnotatedDataset(annotatedDataset) + .build(); + } + + public static String format(String project, String dataset, String annotatedDataset) { + return newBuilder() + .setProject(project) + .setDataset(dataset) + .setAnnotatedDataset(annotatedDataset) + .build() + .toString(); + } + + public static AnnotatedDatasetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "AnnotatedDatasetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("dataset"), matchMap.get("annotated_dataset")); + } + + 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 (AnnotatedDatasetName 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("dataset", dataset); + fieldMapBuilder.put("annotatedDataset", annotatedDataset); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "dataset", dataset, "annotated_dataset", annotatedDataset); + } + + /** Builder for AnnotatedDatasetName. */ + public static class Builder { + + private String project; + private String dataset; + private String annotatedDataset; + + public String getProject() { + return project; + } + + public String getDataset() { + return dataset; + } + + public String getAnnotatedDataset() { + return annotatedDataset; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setAnnotatedDataset(String annotatedDataset) { + this.annotatedDataset = annotatedDataset; + return this; + } + + private Builder() {} + + private Builder(AnnotatedDatasetName annotatedDatasetName) { + project = annotatedDatasetName.project; + dataset = annotatedDatasetName.dataset; + annotatedDataset = annotatedDatasetName.annotatedDataset; + } + + public AnnotatedDatasetName build() { + return new AnnotatedDatasetName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof AnnotatedDatasetName) { + AnnotatedDatasetName that = (AnnotatedDatasetName) o; + return (this.project.equals(that.project)) + && (this.dataset.equals(that.dataset)) + && (this.annotatedDataset.equals(that.annotatedDataset)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= dataset.hashCode(); + h *= 1000003; + h ^= annotatedDataset.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetOrBuilder.java new file mode 100644 index 000000000000..4715c927bf45 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotatedDatasetOrBuilder.java @@ -0,0 +1,247 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface AnnotatedDatasetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.AnnotatedDataset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only.
+   * AnnotatedDataset resource name in format of:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only.
+   * AnnotatedDataset resource name in format of:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The display name of the AnnotatedDataset. It is specified in
+   * HumanAnnotationConfig when user starts a labeling task. Maximum of 64
+   * characters.
+   * 
+ * + * string display_name = 2; + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. The display name of the AnnotatedDataset. It is specified in
+   * HumanAnnotationConfig when user starts a labeling task. Maximum of 64
+   * characters.
+   * 
+ * + * string display_name = 2; + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Output only. The description of the AnnotatedDataset. It is specified in
+   * HumanAnnotationConfig when user starts a labeling task. Maximum of 10000
+   * characters.
+   * 
+ * + * string description = 9; + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Output only. The description of the AnnotatedDataset. It is specified in
+   * HumanAnnotationConfig when user starts a labeling task. Maximum of 10000
+   * characters.
+   * 
+ * + * string description = 9; + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Source of the annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 3; + */ + int getAnnotationSourceValue(); + /** + * + * + *
+   * Output only. Source of the annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 3; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSource getAnnotationSource(); + + /** + * + * + *
+   * Output only. Type of the annotation. It is specified when starting labeling
+   * task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 8; + */ + int getAnnotationTypeValue(); + /** + * + * + *
+   * Output only. Type of the annotation. It is specified when starting labeling
+   * task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationType annotation_type = 8; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationType getAnnotationType(); + + /** + * + * + *
+   * Output only. Number of examples in the annotated dataset.
+   * 
+ * + * int64 example_count = 4; + */ + long getExampleCount(); + + /** + * + * + *
+   * Output only. Number of examples that have annotation in the annotated
+   * dataset.
+   * 
+ * + * int64 completed_example_count = 5; + */ + long getCompletedExampleCount(); + + /** + * + * + *
+   * Output only. Per label statistics.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + boolean hasLabelStats(); + /** + * + * + *
+   * Output only. Per label statistics.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + com.google.cloud.datalabeling.v1beta1.LabelStats getLabelStats(); + /** + * + * + *
+   * Output only. Per label statistics.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 6; + */ + com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder getLabelStatsOrBuilder(); + + /** + * + * + *
+   * Output only. Time the AnnotatedDataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time the AnnotatedDataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time the AnnotatedDataset was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Additional information about AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + boolean hasMetadata(); + /** + * + * + *
+   * Output only. Additional information about AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata getMetadata(); + /** + * + * + *
+   * Output only. Additional information about AnnotatedDataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadata metadata = 10; + */ + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetMetadataOrBuilder getMetadataOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Annotation.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Annotation.java new file mode 100644 index 000000000000..7c7f83ceaf1b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Annotation.java @@ -0,0 +1,1456 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Annotation for Example. Each example may have one or more annotations. For
+ * example in image classification problem, each image might have one or more
+ * labels. We call labels binded with this image an Annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Annotation} + */ +public final class Annotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.Annotation) + AnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Annotation.newBuilder() to construct. + private Annotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Annotation() { + name_ = ""; + annotationSource_ = 0; + annotationSentiment_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Annotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + annotationSource_ = rawValue; + break; + } + case 26: + { + com.google.cloud.datalabeling.v1beta1.AnnotationValue.Builder subBuilder = null; + if (annotationValue_ != null) { + subBuilder = annotationValue_.toBuilder(); + } + annotationValue_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationValue.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationValue_); + annotationValue_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.Builder subBuilder = null; + if (annotationMetadata_ != null) { + subBuilder = annotationMetadata_.toBuilder(); + } + annotationMetadata_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationMetadata_); + annotationMetadata_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + int rawValue = input.readEnum(); + + annotationSentiment_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Annotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Annotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Annotation.class, + com.google.cloud.datalabeling.v1beta1.Annotation.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Unique name of this annotation, format is:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Unique name of this annotation, format is:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATION_SOURCE_FIELD_NUMBER = 2; + private int annotationSource_; + /** + * + * + *
+   * Output only. The source of the annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2; + */ + public int getAnnotationSourceValue() { + return annotationSource_; + } + /** + * + * + *
+   * Output only. The source of the annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSource getAnnotationSource() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.AnnotationSource result = + com.google.cloud.datalabeling.v1beta1.AnnotationSource.valueOf(annotationSource_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSource.UNRECOGNIZED + : result; + } + + public static final int ANNOTATION_VALUE_FIELD_NUMBER = 3; + private com.google.cloud.datalabeling.v1beta1.AnnotationValue annotationValue_; + /** + * + * + *
+   * Output only. This is the actual annotation value, e.g classification,
+   * bounding box values are stored here.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + public boolean hasAnnotationValue() { + return annotationValue_ != null; + } + /** + * + * + *
+   * Output only. This is the actual annotation value, e.g classification,
+   * bounding box values are stored here.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationValue getAnnotationValue() { + return annotationValue_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationValue.getDefaultInstance() + : annotationValue_; + } + /** + * + * + *
+   * Output only. This is the actual annotation value, e.g classification,
+   * bounding box values are stored here.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationValueOrBuilder + getAnnotationValueOrBuilder() { + return getAnnotationValue(); + } + + public static final int ANNOTATION_METADATA_FIELD_NUMBER = 4; + private com.google.cloud.datalabeling.v1beta1.AnnotationMetadata annotationMetadata_; + /** + * + * + *
+   * Output only. Annotation metadata, including information like votes
+   * for labels.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + public boolean hasAnnotationMetadata() { + return annotationMetadata_ != null; + } + /** + * + * + *
+   * Output only. Annotation metadata, including information like votes
+   * for labels.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationMetadata getAnnotationMetadata() { + return annotationMetadata_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.getDefaultInstance() + : annotationMetadata_; + } + /** + * + * + *
+   * Output only. Annotation metadata, including information like votes
+   * for labels.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationMetadataOrBuilder + getAnnotationMetadataOrBuilder() { + return getAnnotationMetadata(); + } + + public static final int ANNOTATION_SENTIMENT_FIELD_NUMBER = 6; + private int annotationSentiment_; + /** + * + * + *
+   * Output only. Sentiment for this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6; + */ + public int getAnnotationSentimentValue() { + return annotationSentiment_; + } + /** + * + * + *
+   * Output only. Sentiment for this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSentiment getAnnotationSentiment() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.AnnotationSentiment result = + com.google.cloud.datalabeling.v1beta1.AnnotationSentiment.valueOf(annotationSentiment_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSentiment.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (annotationSource_ + != com.google.cloud.datalabeling.v1beta1.AnnotationSource.ANNOTATION_SOURCE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, annotationSource_); + } + if (annotationValue_ != null) { + output.writeMessage(3, getAnnotationValue()); + } + if (annotationMetadata_ != null) { + output.writeMessage(4, getAnnotationMetadata()); + } + if (annotationSentiment_ + != com.google.cloud.datalabeling.v1beta1.AnnotationSentiment + .ANNOTATION_SENTIMENT_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, annotationSentiment_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (annotationSource_ + != com.google.cloud.datalabeling.v1beta1.AnnotationSource.ANNOTATION_SOURCE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, annotationSource_); + } + if (annotationValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAnnotationValue()); + } + if (annotationMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAnnotationMetadata()); + } + if (annotationSentiment_ + != com.google.cloud.datalabeling.v1beta1.AnnotationSentiment + .ANNOTATION_SENTIMENT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, annotationSentiment_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.Annotation)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.Annotation other = + (com.google.cloud.datalabeling.v1beta1.Annotation) obj; + + if (!getName().equals(other.getName())) return false; + if (annotationSource_ != other.annotationSource_) return false; + if (hasAnnotationValue() != other.hasAnnotationValue()) return false; + if (hasAnnotationValue()) { + if (!getAnnotationValue().equals(other.getAnnotationValue())) return false; + } + if (hasAnnotationMetadata() != other.hasAnnotationMetadata()) return false; + if (hasAnnotationMetadata()) { + if (!getAnnotationMetadata().equals(other.getAnnotationMetadata())) return false; + } + if (annotationSentiment_ != other.annotationSentiment_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ANNOTATION_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + annotationSource_; + if (hasAnnotationValue()) { + hash = (37 * hash) + ANNOTATION_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationValue().hashCode(); + } + if (hasAnnotationMetadata()) { + hash = (37 * hash) + ANNOTATION_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationMetadata().hashCode(); + } + hash = (37 * hash) + ANNOTATION_SENTIMENT_FIELD_NUMBER; + hash = (53 * hash) + annotationSentiment_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.Annotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Annotation for Example. Each example may have one or more annotations. For
+   * example in image classification problem, each image might have one or more
+   * labels. We call labels binded with this image an Annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Annotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.Annotation) + com.google.cloud.datalabeling.v1beta1.AnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Annotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Annotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Annotation.class, + com.google.cloud.datalabeling.v1beta1.Annotation.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.Annotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + annotationSource_ = 0; + + if (annotationValueBuilder_ == null) { + annotationValue_ = null; + } else { + annotationValue_ = null; + annotationValueBuilder_ = null; + } + if (annotationMetadataBuilder_ == null) { + annotationMetadata_ = null; + } else { + annotationMetadata_ = null; + annotationMetadataBuilder_ = null; + } + annotationSentiment_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Annotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Annotation getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.Annotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Annotation build() { + com.google.cloud.datalabeling.v1beta1.Annotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Annotation buildPartial() { + com.google.cloud.datalabeling.v1beta1.Annotation result = + new com.google.cloud.datalabeling.v1beta1.Annotation(this); + result.name_ = name_; + result.annotationSource_ = annotationSource_; + if (annotationValueBuilder_ == null) { + result.annotationValue_ = annotationValue_; + } else { + result.annotationValue_ = annotationValueBuilder_.build(); + } + if (annotationMetadataBuilder_ == null) { + result.annotationMetadata_ = annotationMetadata_; + } else { + result.annotationMetadata_ = annotationMetadataBuilder_.build(); + } + result.annotationSentiment_ = annotationSentiment_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.Annotation) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.Annotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.Annotation other) { + if (other == com.google.cloud.datalabeling.v1beta1.Annotation.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.annotationSource_ != 0) { + setAnnotationSourceValue(other.getAnnotationSourceValue()); + } + if (other.hasAnnotationValue()) { + mergeAnnotationValue(other.getAnnotationValue()); + } + if (other.hasAnnotationMetadata()) { + mergeAnnotationMetadata(other.getAnnotationMetadata()); + } + if (other.annotationSentiment_ != 0) { + setAnnotationSentimentValue(other.getAnnotationSentimentValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.Annotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datalabeling.v1beta1.Annotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Unique name of this annotation, format is:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Unique name of this annotation, format is:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Unique name of this annotation, format is:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique name of this annotation, format is:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Unique name of this annotation, format is:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int annotationSource_ = 0; + /** + * + * + *
+     * Output only. The source of the annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2; + */ + public int getAnnotationSourceValue() { + return annotationSource_; + } + /** + * + * + *
+     * Output only. The source of the annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2; + */ + public Builder setAnnotationSourceValue(int value) { + annotationSource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The source of the annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSource getAnnotationSource() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.AnnotationSource result = + com.google.cloud.datalabeling.v1beta1.AnnotationSource.valueOf(annotationSource_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSource.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The source of the annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2; + */ + public Builder setAnnotationSource( + com.google.cloud.datalabeling.v1beta1.AnnotationSource value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSource_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The source of the annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2; + */ + public Builder clearAnnotationSource() { + + annotationSource_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.AnnotationValue annotationValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationValue, + com.google.cloud.datalabeling.v1beta1.AnnotationValue.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationValueOrBuilder> + annotationValueBuilder_; + /** + * + * + *
+     * Output only. This is the actual annotation value, e.g classification,
+     * bounding box values are stored here.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + public boolean hasAnnotationValue() { + return annotationValueBuilder_ != null || annotationValue_ != null; + } + /** + * + * + *
+     * Output only. This is the actual annotation value, e.g classification,
+     * bounding box values are stored here.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationValue getAnnotationValue() { + if (annotationValueBuilder_ == null) { + return annotationValue_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationValue.getDefaultInstance() + : annotationValue_; + } else { + return annotationValueBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. This is the actual annotation value, e.g classification,
+     * bounding box values are stored here.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + public Builder setAnnotationValue(com.google.cloud.datalabeling.v1beta1.AnnotationValue value) { + if (annotationValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationValue_ = value; + onChanged(); + } else { + annotationValueBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. This is the actual annotation value, e.g classification,
+     * bounding box values are stored here.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + public Builder setAnnotationValue( + com.google.cloud.datalabeling.v1beta1.AnnotationValue.Builder builderForValue) { + if (annotationValueBuilder_ == null) { + annotationValue_ = builderForValue.build(); + onChanged(); + } else { + annotationValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. This is the actual annotation value, e.g classification,
+     * bounding box values are stored here.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + public Builder mergeAnnotationValue( + com.google.cloud.datalabeling.v1beta1.AnnotationValue value) { + if (annotationValueBuilder_ == null) { + if (annotationValue_ != null) { + annotationValue_ = + com.google.cloud.datalabeling.v1beta1.AnnotationValue.newBuilder(annotationValue_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationValue_ = value; + } + onChanged(); + } else { + annotationValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. This is the actual annotation value, e.g classification,
+     * bounding box values are stored here.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + public Builder clearAnnotationValue() { + if (annotationValueBuilder_ == null) { + annotationValue_ = null; + onChanged(); + } else { + annotationValue_ = null; + annotationValueBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. This is the actual annotation value, e.g classification,
+     * bounding box values are stored here.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationValue.Builder + getAnnotationValueBuilder() { + + onChanged(); + return getAnnotationValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. This is the actual annotation value, e.g classification,
+     * bounding box values are stored here.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationValueOrBuilder + getAnnotationValueOrBuilder() { + if (annotationValueBuilder_ != null) { + return annotationValueBuilder_.getMessageOrBuilder(); + } else { + return annotationValue_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationValue.getDefaultInstance() + : annotationValue_; + } + } + /** + * + * + *
+     * Output only. This is the actual annotation value, e.g classification,
+     * bounding box values are stored here.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationValue, + com.google.cloud.datalabeling.v1beta1.AnnotationValue.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationValueOrBuilder> + getAnnotationValueFieldBuilder() { + if (annotationValueBuilder_ == null) { + annotationValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationValue, + com.google.cloud.datalabeling.v1beta1.AnnotationValue.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationValueOrBuilder>( + getAnnotationValue(), getParentForChildren(), isClean()); + annotationValue_ = null; + } + return annotationValueBuilder_; + } + + private com.google.cloud.datalabeling.v1beta1.AnnotationMetadata annotationMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata, + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationMetadataOrBuilder> + annotationMetadataBuilder_; + /** + * + * + *
+     * Output only. Annotation metadata, including information like votes
+     * for labels.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + public boolean hasAnnotationMetadata() { + return annotationMetadataBuilder_ != null || annotationMetadata_ != null; + } + /** + * + * + *
+     * Output only. Annotation metadata, including information like votes
+     * for labels.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationMetadata getAnnotationMetadata() { + if (annotationMetadataBuilder_ == null) { + return annotationMetadata_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.getDefaultInstance() + : annotationMetadata_; + } else { + return annotationMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Annotation metadata, including information like votes
+     * for labels.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + public Builder setAnnotationMetadata( + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata value) { + if (annotationMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationMetadata_ = value; + onChanged(); + } else { + annotationMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Annotation metadata, including information like votes
+     * for labels.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + public Builder setAnnotationMetadata( + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.Builder builderForValue) { + if (annotationMetadataBuilder_ == null) { + annotationMetadata_ = builderForValue.build(); + onChanged(); + } else { + annotationMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Annotation metadata, including information like votes
+     * for labels.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + public Builder mergeAnnotationMetadata( + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata value) { + if (annotationMetadataBuilder_ == null) { + if (annotationMetadata_ != null) { + annotationMetadata_ = + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.newBuilder( + annotationMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationMetadata_ = value; + } + onChanged(); + } else { + annotationMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Annotation metadata, including information like votes
+     * for labels.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + public Builder clearAnnotationMetadata() { + if (annotationMetadataBuilder_ == null) { + annotationMetadata_ = null; + onChanged(); + } else { + annotationMetadata_ = null; + annotationMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Annotation metadata, including information like votes
+     * for labels.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.Builder + getAnnotationMetadataBuilder() { + + onChanged(); + return getAnnotationMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Annotation metadata, including information like votes
+     * for labels.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationMetadataOrBuilder + getAnnotationMetadataOrBuilder() { + if (annotationMetadataBuilder_ != null) { + return annotationMetadataBuilder_.getMessageOrBuilder(); + } else { + return annotationMetadata_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.getDefaultInstance() + : annotationMetadata_; + } + } + /** + * + * + *
+     * Output only. Annotation metadata, including information like votes
+     * for labels.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata, + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationMetadataOrBuilder> + getAnnotationMetadataFieldBuilder() { + if (annotationMetadataBuilder_ == null) { + annotationMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata, + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationMetadataOrBuilder>( + getAnnotationMetadata(), getParentForChildren(), isClean()); + annotationMetadata_ = null; + } + return annotationMetadataBuilder_; + } + + private int annotationSentiment_ = 0; + /** + * + * + *
+     * Output only. Sentiment for this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6; + */ + public int getAnnotationSentimentValue() { + return annotationSentiment_; + } + /** + * + * + *
+     * Output only. Sentiment for this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6; + */ + public Builder setAnnotationSentimentValue(int value) { + annotationSentiment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Sentiment for this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSentiment getAnnotationSentiment() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.AnnotationSentiment result = + com.google.cloud.datalabeling.v1beta1.AnnotationSentiment.valueOf(annotationSentiment_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSentiment.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Sentiment for this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6; + */ + public Builder setAnnotationSentiment( + com.google.cloud.datalabeling.v1beta1.AnnotationSentiment value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSentiment_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Sentiment for this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6; + */ + public Builder clearAnnotationSentiment() { + + annotationSentiment_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.Annotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.Annotation) + private static final com.google.cloud.datalabeling.v1beta1.Annotation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.Annotation(); + } + + public static com.google.cloud.datalabeling.v1beta1.Annotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Annotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Annotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Annotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationMetadata.java new file mode 100644 index 000000000000..5871c44d5bb3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationMetadata.java @@ -0,0 +1,710 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Additional information associated with the annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotationMetadata} + */ +public final class AnnotationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.AnnotationMetadata) + AnnotationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotationMetadata.newBuilder() to construct. + private AnnotationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + com.google.cloud.datalabeling.v1beta1.OperatorMetadata.Builder subBuilder = null; + if (operatorMetadata_ != null) { + subBuilder = operatorMetadata_.toBuilder(); + } + operatorMetadata_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.OperatorMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(operatorMetadata_); + operatorMetadata_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.class, + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.Builder.class); + } + + public static final int OPERATOR_METADATA_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.OperatorMetadata operatorMetadata_; + /** + * + * + *
+   * Metadata related to human labeling.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + public boolean hasOperatorMetadata() { + return operatorMetadata_ != null; + } + /** + * + * + *
+   * Metadata related to human labeling.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + public com.google.cloud.datalabeling.v1beta1.OperatorMetadata getOperatorMetadata() { + return operatorMetadata_ == null + ? com.google.cloud.datalabeling.v1beta1.OperatorMetadata.getDefaultInstance() + : operatorMetadata_; + } + /** + * + * + *
+   * Metadata related to human labeling.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + public com.google.cloud.datalabeling.v1beta1.OperatorMetadataOrBuilder + getOperatorMetadataOrBuilder() { + return getOperatorMetadata(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (operatorMetadata_ != null) { + output.writeMessage(2, getOperatorMetadata()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (operatorMetadata_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOperatorMetadata()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.AnnotationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata other = + (com.google.cloud.datalabeling.v1beta1.AnnotationMetadata) obj; + + if (hasOperatorMetadata() != other.hasOperatorMetadata()) return false; + if (hasOperatorMetadata()) { + if (!getOperatorMetadata().equals(other.getOperatorMetadata())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasOperatorMetadata()) { + hash = (37 * hash) + OPERATOR_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getOperatorMetadata().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Additional information associated with the annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.AnnotationMetadata) + com.google.cloud.datalabeling.v1beta1.AnnotationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.class, + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (operatorMetadataBuilder_ == null) { + operatorMetadata_ = null; + } else { + operatorMetadata_ = null; + operatorMetadataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationMetadata getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationMetadata build() { + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationMetadata buildPartial() { + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata result = + new com.google.cloud.datalabeling.v1beta1.AnnotationMetadata(this); + if (operatorMetadataBuilder_ == null) { + result.operatorMetadata_ = operatorMetadata_; + } else { + result.operatorMetadata_ = operatorMetadataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.AnnotationMetadata) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.AnnotationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.AnnotationMetadata other) { + if (other == com.google.cloud.datalabeling.v1beta1.AnnotationMetadata.getDefaultInstance()) + return this; + if (other.hasOperatorMetadata()) { + mergeOperatorMetadata(other.getOperatorMetadata()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.AnnotationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.OperatorMetadata operatorMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.OperatorMetadata, + com.google.cloud.datalabeling.v1beta1.OperatorMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.OperatorMetadataOrBuilder> + operatorMetadataBuilder_; + /** + * + * + *
+     * Metadata related to human labeling.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + public boolean hasOperatorMetadata() { + return operatorMetadataBuilder_ != null || operatorMetadata_ != null; + } + /** + * + * + *
+     * Metadata related to human labeling.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + public com.google.cloud.datalabeling.v1beta1.OperatorMetadata getOperatorMetadata() { + if (operatorMetadataBuilder_ == null) { + return operatorMetadata_ == null + ? com.google.cloud.datalabeling.v1beta1.OperatorMetadata.getDefaultInstance() + : operatorMetadata_; + } else { + return operatorMetadataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Metadata related to human labeling.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + public Builder setOperatorMetadata( + com.google.cloud.datalabeling.v1beta1.OperatorMetadata value) { + if (operatorMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operatorMetadata_ = value; + onChanged(); + } else { + operatorMetadataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Metadata related to human labeling.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + public Builder setOperatorMetadata( + com.google.cloud.datalabeling.v1beta1.OperatorMetadata.Builder builderForValue) { + if (operatorMetadataBuilder_ == null) { + operatorMetadata_ = builderForValue.build(); + onChanged(); + } else { + operatorMetadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Metadata related to human labeling.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + public Builder mergeOperatorMetadata( + com.google.cloud.datalabeling.v1beta1.OperatorMetadata value) { + if (operatorMetadataBuilder_ == null) { + if (operatorMetadata_ != null) { + operatorMetadata_ = + com.google.cloud.datalabeling.v1beta1.OperatorMetadata.newBuilder(operatorMetadata_) + .mergeFrom(value) + .buildPartial(); + } else { + operatorMetadata_ = value; + } + onChanged(); + } else { + operatorMetadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Metadata related to human labeling.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + public Builder clearOperatorMetadata() { + if (operatorMetadataBuilder_ == null) { + operatorMetadata_ = null; + onChanged(); + } else { + operatorMetadata_ = null; + operatorMetadataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Metadata related to human labeling.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + public com.google.cloud.datalabeling.v1beta1.OperatorMetadata.Builder + getOperatorMetadataBuilder() { + + onChanged(); + return getOperatorMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Metadata related to human labeling.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + public com.google.cloud.datalabeling.v1beta1.OperatorMetadataOrBuilder + getOperatorMetadataOrBuilder() { + if (operatorMetadataBuilder_ != null) { + return operatorMetadataBuilder_.getMessageOrBuilder(); + } else { + return operatorMetadata_ == null + ? com.google.cloud.datalabeling.v1beta1.OperatorMetadata.getDefaultInstance() + : operatorMetadata_; + } + } + /** + * + * + *
+     * Metadata related to human labeling.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.OperatorMetadata, + com.google.cloud.datalabeling.v1beta1.OperatorMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.OperatorMetadataOrBuilder> + getOperatorMetadataFieldBuilder() { + if (operatorMetadataBuilder_ == null) { + operatorMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.OperatorMetadata, + com.google.cloud.datalabeling.v1beta1.OperatorMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.OperatorMetadataOrBuilder>( + getOperatorMetadata(), getParentForChildren(), isClean()); + operatorMetadata_ = null; + } + return operatorMetadataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.AnnotationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.AnnotationMetadata) + private static final com.google.cloud.datalabeling.v1beta1.AnnotationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.AnnotationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationMetadataOrBuilder.java new file mode 100644 index 000000000000..6ea248eb8927 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface AnnotationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.AnnotationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Metadata related to human labeling.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + boolean hasOperatorMetadata(); + /** + * + * + *
+   * Metadata related to human labeling.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + com.google.cloud.datalabeling.v1beta1.OperatorMetadata getOperatorMetadata(); + /** + * + * + *
+   * Metadata related to human labeling.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OperatorMetadata operator_metadata = 2; + */ + com.google.cloud.datalabeling.v1beta1.OperatorMetadataOrBuilder getOperatorMetadataOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationOrBuilder.java new file mode 100644 index 000000000000..8190a97263b5 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationOrBuilder.java @@ -0,0 +1,144 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface AnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.Annotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Unique name of this annotation, format is:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Unique name of this annotation, format is:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The source of the annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2; + */ + int getAnnotationSourceValue(); + /** + * + * + *
+   * Output only. The source of the annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSource getAnnotationSource(); + + /** + * + * + *
+   * Output only. This is the actual annotation value, e.g classification,
+   * bounding box values are stored here.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + boolean hasAnnotationValue(); + /** + * + * + *
+   * Output only. This is the actual annotation value, e.g classification,
+   * bounding box values are stored here.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationValue getAnnotationValue(); + /** + * + * + *
+   * Output only. This is the actual annotation value, e.g classification,
+   * bounding box values are stored here.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationValueOrBuilder getAnnotationValueOrBuilder(); + + /** + * + * + *
+   * Output only. Annotation metadata, including information like votes
+   * for labels.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + boolean hasAnnotationMetadata(); + /** + * + * + *
+   * Output only. Annotation metadata, including information like votes
+   * for labels.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationMetadata getAnnotationMetadata(); + /** + * + * + *
+   * Output only. Annotation metadata, including information like votes
+   * for labels.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationMetadataOrBuilder + getAnnotationMetadataOrBuilder(); + + /** + * + * + *
+   * Output only. Sentiment for this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6; + */ + int getAnnotationSentimentValue(); + /** + * + * + *
+   * Output only. Sentiment for this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSentiment getAnnotationSentiment(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationOuterClass.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationOuterClass.java new file mode 100644 index 000000000000..83d2676a2afb --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationOuterClass.java @@ -0,0 +1,462 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public final class AnnotationOuterClass { + private AnnotationOuterClass() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_Annotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_Annotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_AnnotationValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_AnnotationValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_Vertex_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_Vertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_NormalizedVertex_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_NormalizedVertex_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_BoundingPoly_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_BoundingPoly_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_NormalizedBoundingPoly_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_NormalizedBoundingPoly_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ImageBoundingPolyAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ImageBoundingPolyAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_Polyline_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_Polyline_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_NormalizedPolyline_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_NormalizedPolyline_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ImagePolylineAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ImagePolylineAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_AnnotationColorsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_AnnotationColorsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_TextClassificationAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_TextClassificationAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_TimeSegment_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_TimeSegment_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingFrame_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingFrame_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_VideoObjectTrackingAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_VideoObjectTrackingAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_VideoEventAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_VideoEventAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_AudioRecognitionAnnotation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_AudioRecognitionAnnotation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_AnnotationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_AnnotationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_OperatorMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_OperatorMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/datalabeling/v1beta1/anno" + + "tation.proto\022!google.cloud.datalabeling." + + "v1beta1\032;google/cloud/datalabeling/v1bet" + + "a1/annotation_spec_set.proto\032\036google/pro" + + "tobuf/duration.proto\032\034google/protobuf/st" + + "ruct.proto\032\037google/protobuf/timestamp.pr" + + "oto\032\034google/api/annotations.proto\"\342\002\n\nAn" + + "notation\022\014\n\004name\030\001 \001(\t\022N\n\021annotation_sou" + + "rce\030\002 \001(\01623.google.cloud.datalabeling.v1" + + "beta1.AnnotationSource\022L\n\020annotation_val" + + "ue\030\003 \001(\01322.google.cloud.datalabeling.v1b" + + "eta1.AnnotationValue\022R\n\023annotation_metad" + + "ata\030\004 \001(\01325.google.cloud.datalabeling.v1" + + "beta1.AnnotationMetadata\022T\n\024annotation_s" + + "entiment\030\006 \001(\01626.google.cloud.datalabeli" + + "ng.v1beta1.AnnotationSentiment\"\310\007\n\017Annot" + + "ationValue\022k\n\037image_classification_annot" + + "ation\030\001 \001(\0132@.google.cloud.datalabeling." + + "v1beta1.ImageClassificationAnnotationH\000\022" + + "h\n\036image_bounding_poly_annotation\030\002 \001(\0132" + + ">.google.cloud.datalabeling.v1beta1.Imag" + + "eBoundingPolyAnnotationH\000\022_\n\031image_polyl" + + "ine_annotation\030\010 \001(\0132:.google.cloud.data" + + "labeling.v1beta1.ImagePolylineAnnotation" + + "H\000\022g\n\035image_segmentation_annotation\030\t \001(" + + "\0132>.google.cloud.datalabeling.v1beta1.Im" + + "ageSegmentationAnnotationH\000\022i\n\036text_clas" + + "sification_annotation\030\003 \001(\0132?.google.clo" + + "ud.datalabeling.v1beta1.TextClassificati" + + "onAnnotationH\000\022k\n\037video_classification_a" + + "nnotation\030\004 \001(\0132@.google.cloud.datalabel" + + "ing.v1beta1.VideoClassificationAnnotatio" + + "nH\000\022l\n video_object_tracking_annotation\030" + + "\005 \001(\0132@.google.cloud.datalabeling.v1beta" + + "1.VideoObjectTrackingAnnotationH\000\022Y\n\026vid" + + "eo_event_annotation\030\006 \001(\01327.google.cloud" + + ".datalabeling.v1beta1.VideoEventAnnotati" + + "onH\000\022e\n\034audio_recognition_annotation\030\007 \001" + + "(\0132=.google.cloud.datalabeling.v1beta1.A" + + "udioRecognitionAnnotationH\000B\014\n\nvalue_typ" + + "e\"k\n\035ImageClassificationAnnotation\022J\n\017an" + + "notation_spec\030\001 \001(\01321.google.cloud.datal" + + "abeling.v1beta1.AnnotationSpec\"\036\n\006Vertex" + + "\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\"(\n\020NormalizedVert" + + "ex\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"K\n\014BoundingPoly" + + "\022;\n\010vertices\030\001 \003(\0132).google.cloud.datala" + + "beling.v1beta1.Vertex\"j\n\026NormalizedBound" + + "ingPoly\022P\n\023normalized_vertices\030\001 \003(\01323.g" + + "oogle.cloud.datalabeling.v1beta1.Normali" + + "zedVertex\"\242\002\n\033ImageBoundingPolyAnnotatio" + + "n\022H\n\rbounding_poly\030\002 \001(\0132/.google.cloud." + + "datalabeling.v1beta1.BoundingPolyH\000\022]\n\030n" + + "ormalized_bounding_poly\030\003 \001(\01329.google.c" + + "loud.datalabeling.v1beta1.NormalizedBoun" + + "dingPolyH\000\022J\n\017annotation_spec\030\001 \001(\01321.go" + + "ogle.cloud.datalabeling.v1beta1.Annotati" + + "onSpecB\016\n\014bounded_area\"G\n\010Polyline\022;\n\010ve" + + "rtices\030\001 \003(\0132).google.cloud.datalabeling" + + ".v1beta1.Vertex\"f\n\022NormalizedPolyline\022P\n" + + "\023normalized_vertices\030\001 \003(\01323.google.clou" + + "d.datalabeling.v1beta1.NormalizedVertex\"" + + "\204\002\n\027ImagePolylineAnnotation\022?\n\010polyline\030" + + "\002 \001(\0132+.google.cloud.datalabeling.v1beta" + + "1.PolylineH\000\022T\n\023normalized_polyline\030\003 \001(" + + "\01325.google.cloud.datalabeling.v1beta1.No" + + "rmalizedPolylineH\000\022J\n\017annotation_spec\030\001 " + + "\001(\01321.google.cloud.datalabeling.v1beta1." + + "AnnotationSpecB\006\n\004poly\"\242\002\n\033ImageSegmenta" + + "tionAnnotation\022o\n\021annotation_colors\030\001 \003(" + + "\0132T.google.cloud.datalabeling.v1beta1.Im" + + "ageSegmentationAnnotation.AnnotationColo" + + "rsEntry\022\021\n\tmime_type\030\002 \001(\t\022\023\n\013image_byte" + + "s\030\003 \001(\014\032j\n\025AnnotationColorsEntry\022\013\n\003key\030" + + "\001 \001(\t\022@\n\005value\030\002 \001(\01321.google.cloud.data" + + "labeling.v1beta1.AnnotationSpec:\0028\001\"j\n\034T" + + "extClassificationAnnotation\022J\n\017annotatio" + + "n_spec\030\001 \001(\01321.google.cloud.datalabeling" + + ".v1beta1.AnnotationSpec\"w\n\013TimeSegment\0224" + + "\n\021start_time_offset\030\001 \001(\0132\031.google.proto" + + "buf.Duration\0222\n\017end_time_offset\030\002 \001(\0132\031." + + "google.protobuf.Duration\"\261\001\n\035VideoClassi" + + "ficationAnnotation\022D\n\014time_segment\030\001 \001(\013" + + "2..google.cloud.datalabeling.v1beta1.Tim" + + "eSegment\022J\n\017annotation_spec\030\002 \001(\01321.goog" + + "le.cloud.datalabeling.v1beta1.Annotation" + + "Spec\"\376\001\n\023ObjectTrackingFrame\022H\n\rbounding" + + "_poly\030\001 \001(\0132/.google.cloud.datalabeling." + + "v1beta1.BoundingPolyH\000\022]\n\030normalized_bou" + + "nding_poly\030\002 \001(\01329.google.cloud.datalabe" + + "ling.v1beta1.NormalizedBoundingPolyH\000\022.\n" + + "\013time_offset\030\003 \001(\0132\031.google.protobuf.Dur" + + "ationB\016\n\014bounded_area\"\211\002\n\035VideoObjectTra" + + "ckingAnnotation\022J\n\017annotation_spec\030\001 \001(\013" + + "21.google.cloud.datalabeling.v1beta1.Ann" + + "otationSpec\022D\n\014time_segment\030\002 \001(\0132..goog" + + "le.cloud.datalabeling.v1beta1.TimeSegmen" + + "t\022V\n\026object_tracking_frames\030\003 \003(\01326.goog" + + "le.cloud.datalabeling.v1beta1.ObjectTrac" + + "kingFrame\"\250\001\n\024VideoEventAnnotation\022J\n\017an" + + "notation_spec\030\001 \001(\01321.google.cloud.datal" + + "abeling.v1beta1.AnnotationSpec\022D\n\014time_s" + + "egment\030\002 \001(\0132..google.cloud.datalabeling" + + ".v1beta1.TimeSegment\"\220\001\n\032AudioRecognitio" + + "nAnnotation\022\022\n\ntranscript\030\001 \001(\t\022/\n\014start" + + "_offset\030\002 \001(\0132\031.google.protobuf.Duration" + + "\022-\n\nend_offset\030\003 \001(\0132\031.google.protobuf.D" + + "uration\"d\n\022AnnotationMetadata\022N\n\021operato" + + "r_metadata\030\002 \001(\01323.google.cloud.datalabe" + + "ling.v1beta1.OperatorMetadata\"]\n\020Operato" + + "rMetadata\022\r\n\005score\030\001 \001(\002\022\023\n\013total_votes\030" + + "\002 \001(\005\022\023\n\013label_votes\030\003 \001(\005\022\020\n\010comments\030\004" + + " \003(\t*C\n\020AnnotationSource\022!\n\035ANNOTATION_S" + + "OURCE_UNSPECIFIED\020\000\022\014\n\010OPERATOR\020\003*W\n\023Ann" + + "otationSentiment\022$\n ANNOTATION_SENTIMENT" + + "_UNSPECIFIED\020\000\022\014\n\010NEGATIVE\020\001\022\014\n\010POSITIVE" + + "\020\002*\216\004\n\016AnnotationType\022\037\n\033ANNOTATION_TYPE" + + "_UNSPECIFIED\020\000\022#\n\037IMAGE_CLASSIFICATION_A" + + "NNOTATION\020\001\022!\n\035IMAGE_BOUNDING_BOX_ANNOTA" + + "TION\020\002\022*\n&IMAGE_ORIENTED_BOUNDING_BOX_AN" + + "NOTATION\020\r\022\"\n\036IMAGE_BOUNDING_POLY_ANNOTA" + + "TION\020\n\022\035\n\031IMAGE_POLYLINE_ANNOTATION\020\013\022!\n" + + "\035IMAGE_SEGMENTATION_ANNOTATION\020\014\022)\n%VIDE" + + "O_SHOTS_CLASSIFICATION_ANNOTATION\020\003\022$\n V" + + "IDEO_OBJECT_TRACKING_ANNOTATION\020\004\022%\n!VID" + + "EO_OBJECT_DETECTION_ANNOTATION\020\005\022\032\n\026VIDE" + + "O_EVENT_ANNOTATION\020\006\022\"\n\036AUDIO_TRANSCRIPT" + + "ION_ANNOTATION\020\007\022\"\n\036TEXT_CLASSIFICATION_" + + "ANNOTATION\020\010\022%\n!TEXT_ENTITY_EXTRACTION_A" + + "NNOTATION\020\tBx\n%com.google.cloud.datalabe" + + "ling.v1beta1P\001ZMgoogle.golang.org/genpro" + + "to/googleapis/cloud/datalabeling/v1beta1" + + ";datalabelingb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }, + assigner); + internal_static_google_cloud_datalabeling_v1beta1_Annotation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datalabeling_v1beta1_Annotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_Annotation_descriptor, + new java.lang.String[] { + "Name", + "AnnotationSource", + "AnnotationValue", + "AnnotationMetadata", + "AnnotationSentiment", + }); + internal_static_google_cloud_datalabeling_v1beta1_AnnotationValue_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datalabeling_v1beta1_AnnotationValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_AnnotationValue_descriptor, + new java.lang.String[] { + "ImageClassificationAnnotation", + "ImageBoundingPolyAnnotation", + "ImagePolylineAnnotation", + "ImageSegmentationAnnotation", + "TextClassificationAnnotation", + "VideoClassificationAnnotation", + "VideoObjectTrackingAnnotation", + "VideoEventAnnotation", + "AudioRecognitionAnnotation", + "ValueType", + }); + internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationAnnotation_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationAnnotation_descriptor, + new java.lang.String[] { + "AnnotationSpec", + }); + internal_static_google_cloud_datalabeling_v1beta1_Vertex_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_datalabeling_v1beta1_Vertex_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_Vertex_descriptor, + new java.lang.String[] { + "X", "Y", + }); + internal_static_google_cloud_datalabeling_v1beta1_NormalizedVertex_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_datalabeling_v1beta1_NormalizedVertex_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_NormalizedVertex_descriptor, + new java.lang.String[] { + "X", "Y", + }); + internal_static_google_cloud_datalabeling_v1beta1_BoundingPoly_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_datalabeling_v1beta1_BoundingPoly_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_BoundingPoly_descriptor, + new java.lang.String[] { + "Vertices", + }); + internal_static_google_cloud_datalabeling_v1beta1_NormalizedBoundingPoly_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_datalabeling_v1beta1_NormalizedBoundingPoly_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_NormalizedBoundingPoly_descriptor, + new java.lang.String[] { + "NormalizedVertices", + }); + internal_static_google_cloud_datalabeling_v1beta1_ImageBoundingPolyAnnotation_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_datalabeling_v1beta1_ImageBoundingPolyAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ImageBoundingPolyAnnotation_descriptor, + new java.lang.String[] { + "BoundingPoly", "NormalizedBoundingPoly", "AnnotationSpec", "BoundedArea", + }); + internal_static_google_cloud_datalabeling_v1beta1_Polyline_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_datalabeling_v1beta1_Polyline_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_Polyline_descriptor, + new java.lang.String[] { + "Vertices", + }); + internal_static_google_cloud_datalabeling_v1beta1_NormalizedPolyline_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_datalabeling_v1beta1_NormalizedPolyline_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_NormalizedPolyline_descriptor, + new java.lang.String[] { + "NormalizedVertices", + }); + internal_static_google_cloud_datalabeling_v1beta1_ImagePolylineAnnotation_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_datalabeling_v1beta1_ImagePolylineAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ImagePolylineAnnotation_descriptor, + new java.lang.String[] { + "Polyline", "NormalizedPolyline", "AnnotationSpec", "Poly", + }); + internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_descriptor, + new java.lang.String[] { + "AnnotationColors", "MimeType", "ImageBytes", + }); + internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_AnnotationColorsEntry_descriptor = + internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_AnnotationColorsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_AnnotationColorsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_datalabeling_v1beta1_TextClassificationAnnotation_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_datalabeling_v1beta1_TextClassificationAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_TextClassificationAnnotation_descriptor, + new java.lang.String[] { + "AnnotationSpec", + }); + internal_static_google_cloud_datalabeling_v1beta1_TimeSegment_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_datalabeling_v1beta1_TimeSegment_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_TimeSegment_descriptor, + new java.lang.String[] { + "StartTimeOffset", "EndTimeOffset", + }); + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationAnnotation_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationAnnotation_descriptor, + new java.lang.String[] { + "TimeSegment", "AnnotationSpec", + }); + internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingFrame_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingFrame_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingFrame_descriptor, + new java.lang.String[] { + "BoundingPoly", "NormalizedBoundingPoly", "TimeOffset", "BoundedArea", + }); + internal_static_google_cloud_datalabeling_v1beta1_VideoObjectTrackingAnnotation_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_datalabeling_v1beta1_VideoObjectTrackingAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_VideoObjectTrackingAnnotation_descriptor, + new java.lang.String[] { + "AnnotationSpec", "TimeSegment", "ObjectTrackingFrames", + }); + internal_static_google_cloud_datalabeling_v1beta1_VideoEventAnnotation_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_datalabeling_v1beta1_VideoEventAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_VideoEventAnnotation_descriptor, + new java.lang.String[] { + "AnnotationSpec", "TimeSegment", + }); + internal_static_google_cloud_datalabeling_v1beta1_AudioRecognitionAnnotation_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_datalabeling_v1beta1_AudioRecognitionAnnotation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_AudioRecognitionAnnotation_descriptor, + new java.lang.String[] { + "Transcript", "StartOffset", "EndOffset", + }); + internal_static_google_cloud_datalabeling_v1beta1_AnnotationMetadata_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_datalabeling_v1beta1_AnnotationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_AnnotationMetadata_descriptor, + new java.lang.String[] { + "OperatorMetadata", + }); + internal_static_google_cloud_datalabeling_v1beta1_OperatorMetadata_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_datalabeling_v1beta1_OperatorMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_OperatorMetadata_descriptor, + new java.lang.String[] { + "Score", "TotalVotes", "LabelVotes", "Comments", + }); + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSentiment.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSentiment.java new file mode 100644 index 000000000000..eb656711909a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSentiment.java @@ -0,0 +1,130 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** Protobuf enum {@code google.cloud.datalabeling.v1beta1.AnnotationSentiment} */ +public enum AnnotationSentiment implements com.google.protobuf.ProtocolMessageEnum { + /** ANNOTATION_SENTIMENT_UNSPECIFIED = 0; */ + ANNOTATION_SENTIMENT_UNSPECIFIED(0), + /** + * + * + *
+   * This annotation describes negatively about the data.
+   * 
+ * + * NEGATIVE = 1; + */ + NEGATIVE(1), + /** + * + * + *
+   * This label describes positively about the data.
+   * 
+ * + * POSITIVE = 2; + */ + POSITIVE(2), + UNRECOGNIZED(-1), + ; + + /** ANNOTATION_SENTIMENT_UNSPECIFIED = 0; */ + public static final int ANNOTATION_SENTIMENT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * This annotation describes negatively about the data.
+   * 
+ * + * NEGATIVE = 1; + */ + public static final int NEGATIVE_VALUE = 1; + /** + * + * + *
+   * This label describes positively about the data.
+   * 
+ * + * POSITIVE = 2; + */ + public static final int POSITIVE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static AnnotationSentiment valueOf(int value) { + return forNumber(value); + } + + public static AnnotationSentiment forNumber(int value) { + switch (value) { + case 0: + return ANNOTATION_SENTIMENT_UNSPECIFIED; + case 1: + return NEGATIVE; + case 2: + return POSITIVE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AnnotationSentiment findValueByNumber(int number) { + return AnnotationSentiment.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final AnnotationSentiment[] VALUES = values(); + + public static AnnotationSentiment valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AnnotationSentiment(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datalabeling.v1beta1.AnnotationSentiment) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSource.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSource.java new file mode 100644 index 000000000000..6403b92553d9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSource.java @@ -0,0 +1,113 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Specifies where is the answer from.
+ * 
+ * + * Protobuf enum {@code google.cloud.datalabeling.v1beta1.AnnotationSource} + */ +public enum AnnotationSource implements com.google.protobuf.ProtocolMessageEnum { + /** ANNOTATION_SOURCE_UNSPECIFIED = 0; */ + ANNOTATION_SOURCE_UNSPECIFIED(0), + /** + * + * + *
+   * Answer is provided by a human contributor.
+   * 
+ * + * OPERATOR = 3; + */ + OPERATOR(3), + UNRECOGNIZED(-1), + ; + + /** ANNOTATION_SOURCE_UNSPECIFIED = 0; */ + public static final int ANNOTATION_SOURCE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Answer is provided by a human contributor.
+   * 
+ * + * OPERATOR = 3; + */ + public static final int OPERATOR_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static AnnotationSource valueOf(int value) { + return forNumber(value); + } + + public static AnnotationSource forNumber(int value) { + switch (value) { + case 0: + return ANNOTATION_SOURCE_UNSPECIFIED; + case 3: + return OPERATOR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AnnotationSource findValueByNumber(int number) { + return AnnotationSource.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final AnnotationSource[] VALUES = values(); + + public static AnnotationSource valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AnnotationSource(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datalabeling.v1beta1.AnnotationSource) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpec.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpec.java new file mode 100644 index 000000000000..c34a4df781aa --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpec.java @@ -0,0 +1,766 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation_spec_set.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Container of information related to one annotation spec.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotationSpec} + */ +public final class AnnotationSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.AnnotationSpec) + AnnotationSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotationSpec.newBuilder() to construct. + private AnnotationSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotationSpec() { + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotationSpec( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.class, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The display name of the AnnotationSpec. Maximum of 64 characters.
+   * 
+ * + * string display_name = 1; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name of the AnnotationSpec. Maximum of 64 characters.
+   * 
+ * + * string display_name = 1; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. User-provided description of the annotation specification.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 2; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User-provided description of the annotation specification.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 2; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.AnnotationSpec)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.AnnotationSpec other = + (com.google.cloud.datalabeling.v1beta1.AnnotationSpec) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.AnnotationSpec prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Container of information related to one annotation spec.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotationSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.AnnotationSpec) + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.class, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.AnnotationSpec.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + description_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec build() { + com.google.cloud.datalabeling.v1beta1.AnnotationSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec buildPartial() { + com.google.cloud.datalabeling.v1beta1.AnnotationSpec result = + new com.google.cloud.datalabeling.v1beta1.AnnotationSpec(this); + result.displayName_ = displayName_; + result.description_ = description_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.AnnotationSpec) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.AnnotationSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.AnnotationSpec other) { + if (other == com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance()) + return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.AnnotationSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.AnnotationSpec) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the AnnotationSpec. Maximum of 64 characters.
+     * 
+ * + * string display_name = 1; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name of the AnnotationSpec. Maximum of 64 characters.
+     * 
+ * + * string display_name = 1; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name of the AnnotationSpec. Maximum of 64 characters.
+     * 
+ * + * string display_name = 1; + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the AnnotationSpec. Maximum of 64 characters.
+     * 
+ * + * string display_name = 1; + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the AnnotationSpec. Maximum of 64 characters.
+     * 
+ * + * string display_name = 1; + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. User-provided description of the annotation specification.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 2; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 2; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 2; + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 2; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 2; + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.AnnotationSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.AnnotationSpec) + private static final com.google.cloud.datalabeling.v1beta1.AnnotationSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.AnnotationSpec(); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotationSpec(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecOrBuilder.java new file mode 100644 index 000000000000..d3bf0363c75c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation_spec_set.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface AnnotationSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.AnnotationSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The display name of the AnnotationSpec. Maximum of 64 characters.
+   * 
+ * + * string display_name = 1; + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the AnnotationSpec. Maximum of 64 characters.
+   * 
+ * + * string display_name = 1; + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-provided description of the annotation specification.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 2; + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. User-provided description of the annotation specification.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 2; + */ + com.google.protobuf.ByteString getDescriptionBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSet.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSet.java new file mode 100644 index 000000000000..a1c0036acea7 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSet.java @@ -0,0 +1,1460 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation_spec_set.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * AnnotationSpecSet is a collection of label definitions. For example, in
+ * image classification tasks, we define a set of labels, this set is called
+ * AnnotationSpecSet. AnnotationSpecSet is immutable upon creation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotationSpecSet} + */ +public final class AnnotationSpecSet extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.AnnotationSpecSet) + AnnotationSpecSetOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotationSpecSet.newBuilder() to construct. + private AnnotationSpecSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotationSpecSet() { + name_ = ""; + displayName_ = ""; + description_ = ""; + annotationSpecs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotationSpecSet( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + annotationSpecs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + annotationSpecs_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000008) != 0)) { + annotationSpecs_ = java.util.Collections.unmodifiableList(annotationSpecs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpecSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpecSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.class, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only.
+   * AnnotationSpecSet resource name, format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only.
+   * AnnotationSpecSet resource name, format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The display name for AnnotationSpecSet defined by user.
+   * Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name for AnnotationSpecSet defined by user.
+   * Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. User-provided description of the annotation specification set.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User-provided description of the annotation specification set.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATION_SPECS_FIELD_NUMBER = 4; + private java.util.List annotationSpecs_; + /** + * + * + *
+   * Required. The actual spec set defined by the users.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public java.util.List + getAnnotationSpecsList() { + return annotationSpecs_; + } + /** + * + * + *
+   * Required. The actual spec set defined by the users.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public java.util.List + getAnnotationSpecsOrBuilderList() { + return annotationSpecs_; + } + /** + * + * + *
+   * Required. The actual spec set defined by the users.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public int getAnnotationSpecsCount() { + return annotationSpecs_.size(); + } + /** + * + * + *
+   * Required. The actual spec set defined by the users.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpecs(int index) { + return annotationSpecs_.get(index); + } + /** + * + * + *
+   * Required. The actual spec set defined by the users.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder getAnnotationSpecsOrBuilder( + int index) { + return annotationSpecs_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + for (int i = 0; i < annotationSpecs_.size(); i++) { + output.writeMessage(4, annotationSpecs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + for (int i = 0; i < annotationSpecs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, annotationSpecs_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet other = + (com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getAnnotationSpecsList().equals(other.getAnnotationSpecsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (getAnnotationSpecsCount() > 0) { + hash = (37 * hash) + ANNOTATION_SPECS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * AnnotationSpecSet is a collection of label definitions. For example, in
+   * image classification tasks, we define a set of labels, this set is called
+   * AnnotationSpecSet. AnnotationSpecSet is immutable upon creation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotationSpecSet} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.AnnotationSpecSet) + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpecSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpecSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.class, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationSpecsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (annotationSpecsBuilder_ == null) { + annotationSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + annotationSpecsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpecSet_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet build() { + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet buildPartial() { + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet result = + new com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (annotationSpecsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + annotationSpecs_ = java.util.Collections.unmodifiableList(annotationSpecs_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.annotationSpecs_ = annotationSpecs_; + } else { + result.annotationSpecs_ = annotationSpecsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet other) { + if (other == com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (annotationSpecsBuilder_ == null) { + if (!other.annotationSpecs_.isEmpty()) { + if (annotationSpecs_.isEmpty()) { + annotationSpecs_ = other.annotationSpecs_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureAnnotationSpecsIsMutable(); + annotationSpecs_.addAll(other.annotationSpecs_); + } + onChanged(); + } + } else { + if (!other.annotationSpecs_.isEmpty()) { + if (annotationSpecsBuilder_.isEmpty()) { + annotationSpecsBuilder_.dispose(); + annotationSpecsBuilder_ = null; + annotationSpecs_ = other.annotationSpecs_; + bitField0_ = (bitField0_ & ~0x00000008); + annotationSpecsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotationSpecsFieldBuilder() + : null; + } else { + annotationSpecsBuilder_.addAllMessages(other.annotationSpecs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only.
+     * AnnotationSpecSet resource name, format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only.
+     * AnnotationSpecSet resource name, format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only.
+     * AnnotationSpecSet resource name, format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only.
+     * AnnotationSpecSet resource name, format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only.
+     * AnnotationSpecSet resource name, format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name for AnnotationSpecSet defined by user.
+     * Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name for AnnotationSpecSet defined by user.
+     * Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name for AnnotationSpecSet defined by user.
+     * Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name for AnnotationSpecSet defined by user.
+     * Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name for AnnotationSpecSet defined by user.
+     * Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. User-provided description of the annotation specification set.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification set.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification set.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification set.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification set.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.util.List annotationSpecs_ = + java.util.Collections.emptyList(); + + private void ensureAnnotationSpecsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + annotationSpecs_ = + new java.util.ArrayList( + annotationSpecs_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + annotationSpecsBuilder_; + + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public java.util.List + getAnnotationSpecsList() { + if (annotationSpecsBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotationSpecs_); + } else { + return annotationSpecsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public int getAnnotationSpecsCount() { + if (annotationSpecsBuilder_ == null) { + return annotationSpecs_.size(); + } else { + return annotationSpecsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpecs(int index) { + if (annotationSpecsBuilder_ == null) { + return annotationSpecs_.get(index); + } else { + return annotationSpecsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public Builder setAnnotationSpecs( + int index, com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationSpecsIsMutable(); + annotationSpecs_.set(index, value); + onChanged(); + } else { + annotationSpecsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public Builder setAnnotationSpecs( + int index, com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder builderForValue) { + if (annotationSpecsBuilder_ == null) { + ensureAnnotationSpecsIsMutable(); + annotationSpecs_.set(index, builderForValue.build()); + onChanged(); + } else { + annotationSpecsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public Builder addAnnotationSpecs(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationSpecsIsMutable(); + annotationSpecs_.add(value); + onChanged(); + } else { + annotationSpecsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public Builder addAnnotationSpecs( + int index, com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationSpecsIsMutable(); + annotationSpecs_.add(index, value); + onChanged(); + } else { + annotationSpecsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public Builder addAnnotationSpecs( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder builderForValue) { + if (annotationSpecsBuilder_ == null) { + ensureAnnotationSpecsIsMutable(); + annotationSpecs_.add(builderForValue.build()); + onChanged(); + } else { + annotationSpecsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public Builder addAnnotationSpecs( + int index, com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder builderForValue) { + if (annotationSpecsBuilder_ == null) { + ensureAnnotationSpecsIsMutable(); + annotationSpecs_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationSpecsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public Builder addAllAnnotationSpecs( + java.lang.Iterable values) { + if (annotationSpecsBuilder_ == null) { + ensureAnnotationSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationSpecs_); + onChanged(); + } else { + annotationSpecsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public Builder clearAnnotationSpecs() { + if (annotationSpecsBuilder_ == null) { + annotationSpecs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + annotationSpecsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public Builder removeAnnotationSpecs(int index) { + if (annotationSpecsBuilder_ == null) { + ensureAnnotationSpecsIsMutable(); + annotationSpecs_.remove(index); + onChanged(); + } else { + annotationSpecsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder getAnnotationSpecsBuilder( + int index) { + return getAnnotationSpecsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecsOrBuilder(int index) { + if (annotationSpecsBuilder_ == null) { + return annotationSpecs_.get(index); + } else { + return annotationSpecsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public java.util.List + getAnnotationSpecsOrBuilderList() { + if (annotationSpecsBuilder_ != null) { + return annotationSpecsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotationSpecs_); + } + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder + addAnnotationSpecsBuilder() { + return getAnnotationSpecsFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder addAnnotationSpecsBuilder( + int index) { + return getAnnotationSpecsFieldBuilder() + .addBuilder( + index, com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The actual spec set defined by the users.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + public java.util.List + getAnnotationSpecsBuilderList() { + return getAnnotationSpecsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + getAnnotationSpecsFieldBuilder() { + if (annotationSpecsBuilder_ == null) { + annotationSpecsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>( + annotationSpecs_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + annotationSpecs_ = null; + } + return annotationSpecsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.AnnotationSpecSet) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.AnnotationSpecSet) + private static final com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet(); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationSpecSet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotationSpecSet(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSetName.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSetName.java new file mode 100644 index 000000000000..d8c3c7e747ca --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSetName.java @@ -0,0 +1,186 @@ +/* + * 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.datalabeling.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 AnnotationSpecSetName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/annotationSpecSets/{annotation_spec_set}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String annotationSpecSet; + + public String getProject() { + return project; + } + + public String getAnnotationSpecSet() { + return annotationSpecSet; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private AnnotationSpecSetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + annotationSpecSet = Preconditions.checkNotNull(builder.getAnnotationSpecSet()); + } + + public static AnnotationSpecSetName of(String project, String annotationSpecSet) { + return newBuilder().setProject(project).setAnnotationSpecSet(annotationSpecSet).build(); + } + + public static String format(String project, String annotationSpecSet) { + return newBuilder() + .setProject(project) + .setAnnotationSpecSet(annotationSpecSet) + .build() + .toString(); + } + + public static AnnotationSpecSetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "AnnotationSpecSetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("annotation_spec_set")); + } + + 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 (AnnotationSpecSetName 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("annotationSpecSet", annotationSpecSet); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "annotation_spec_set", annotationSpecSet); + } + + /** Builder for AnnotationSpecSetName. */ + public static class Builder { + + private String project; + private String annotationSpecSet; + + public String getProject() { + return project; + } + + public String getAnnotationSpecSet() { + return annotationSpecSet; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setAnnotationSpecSet(String annotationSpecSet) { + this.annotationSpecSet = annotationSpecSet; + return this; + } + + private Builder() {} + + private Builder(AnnotationSpecSetName annotationSpecSetName) { + project = annotationSpecSetName.project; + annotationSpecSet = annotationSpecSetName.annotationSpecSet; + } + + public AnnotationSpecSetName build() { + return new AnnotationSpecSetName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof AnnotationSpecSetName) { + AnnotationSpecSetName that = (AnnotationSpecSetName) o; + return (this.project.equals(that.project)) + && (this.annotationSpecSet.equals(that.annotationSpecSet)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= annotationSpecSet.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSetOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSetOrBuilder.java new file mode 100644 index 000000000000..e91de4b08228 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSetOrBuilder.java @@ -0,0 +1,134 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation_spec_set.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface AnnotationSpecSetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.AnnotationSpecSet) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only.
+   * AnnotationSpecSet resource name, format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only.
+   * AnnotationSpecSet resource name, format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name for AnnotationSpecSet defined by user.
+   * Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name for AnnotationSpecSet defined by user.
+   * Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-provided description of the annotation specification set.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. User-provided description of the annotation specification set.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Required. The actual spec set defined by the users.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + java.util.List getAnnotationSpecsList(); + /** + * + * + *
+   * Required. The actual spec set defined by the users.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpecs(int index); + /** + * + * + *
+   * Required. The actual spec set defined by the users.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + int getAnnotationSpecsCount(); + /** + * + * + *
+   * Required. The actual spec set defined by the users.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + java.util.List + getAnnotationSpecsOrBuilderList(); + /** + * + * + *
+   * Required. The actual spec set defined by the users.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_specs = 4; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder getAnnotationSpecsOrBuilder( + int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSetOuterClass.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSetOuterClass.java new file mode 100644 index 000000000000..f58ec7efb965 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationSpecSetOuterClass.java @@ -0,0 +1,79 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation_spec_set.proto + +package com.google.cloud.datalabeling.v1beta1; + +public final class AnnotationSpecSetOuterClass { + private AnnotationSpecSetOuterClass() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpecSet_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpecSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n;google/cloud/datalabeling/v1beta1/anno" + + "tation_spec_set.proto\022!google.cloud.data" + + "labeling.v1beta1\032\034google/api/annotations" + + ".proto\"\231\001\n\021AnnotationSpecSet\022\014\n\004name\030\001 \001" + + "(\t\022\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030" + + "\003 \001(\t\022K\n\020annotation_specs\030\004 \003(\01321.google" + + ".cloud.datalabeling.v1beta1.AnnotationSp" + + "ec\";\n\016AnnotationSpec\022\024\n\014display_name\030\001 \001" + + "(\t\022\023\n\013description\030\002 \001(\tBx\n%com.google.cl" + + "oud.datalabeling.v1beta1P\001ZMgoogle.golan" + + "g.org/genproto/googleapis/cloud/datalabe" + + "ling/v1beta1;datalabelingb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }, + assigner); + internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpecSet_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpecSet_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpecSet_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Description", "AnnotationSpecs", + }); + internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpec_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_AnnotationSpec_descriptor, + new java.lang.String[] { + "DisplayName", "Description", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationType.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationType.java new file mode 100644 index 000000000000..87ef0b9f4e29 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationType.java @@ -0,0 +1,371 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** Protobuf enum {@code google.cloud.datalabeling.v1beta1.AnnotationType} */ +public enum AnnotationType implements com.google.protobuf.ProtocolMessageEnum { + /** ANNOTATION_TYPE_UNSPECIFIED = 0; */ + ANNOTATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Classification annotations in an image.
+   * 
+ * + * IMAGE_CLASSIFICATION_ANNOTATION = 1; + */ + IMAGE_CLASSIFICATION_ANNOTATION(1), + /** + * + * + *
+   * Bounding box annotations in an image.
+   * 
+ * + * IMAGE_BOUNDING_BOX_ANNOTATION = 2; + */ + IMAGE_BOUNDING_BOX_ANNOTATION(2), + /** + * + * + *
+   * Oriented bounding box. The box does not have to be parallel to horizontal
+   * line.
+   * 
+ * + * IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION = 13; + */ + IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION(13), + /** + * + * + *
+   * Bounding poly annotations in an image.
+   * 
+ * + * IMAGE_BOUNDING_POLY_ANNOTATION = 10; + */ + IMAGE_BOUNDING_POLY_ANNOTATION(10), + /** + * + * + *
+   * Polyline annotations in an image.
+   * 
+ * + * IMAGE_POLYLINE_ANNOTATION = 11; + */ + IMAGE_POLYLINE_ANNOTATION(11), + /** + * + * + *
+   * Segmentation annotations in an image.
+   * 
+ * + * IMAGE_SEGMENTATION_ANNOTATION = 12; + */ + IMAGE_SEGMENTATION_ANNOTATION(12), + /** + * + * + *
+   * Classification annotations in video shots.
+   * 
+ * + * VIDEO_SHOTS_CLASSIFICATION_ANNOTATION = 3; + */ + VIDEO_SHOTS_CLASSIFICATION_ANNOTATION(3), + /** + * + * + *
+   * Video object tracking annotation.
+   * 
+ * + * VIDEO_OBJECT_TRACKING_ANNOTATION = 4; + */ + VIDEO_OBJECT_TRACKING_ANNOTATION(4), + /** + * + * + *
+   * Video object detection annotation.
+   * 
+ * + * VIDEO_OBJECT_DETECTION_ANNOTATION = 5; + */ + VIDEO_OBJECT_DETECTION_ANNOTATION(5), + /** + * + * + *
+   * Video event annotation.
+   * 
+ * + * VIDEO_EVENT_ANNOTATION = 6; + */ + VIDEO_EVENT_ANNOTATION(6), + /** + * + * + *
+   * Speech to text annotation.
+   * 
+ * + * AUDIO_TRANSCRIPTION_ANNOTATION = 7; + */ + AUDIO_TRANSCRIPTION_ANNOTATION(7), + /** + * + * + *
+   * Classification for text.
+   * 
+ * + * TEXT_CLASSIFICATION_ANNOTATION = 8; + */ + TEXT_CLASSIFICATION_ANNOTATION(8), + /** + * + * + *
+   * Entity extraction for text.
+   * 
+ * + * TEXT_ENTITY_EXTRACTION_ANNOTATION = 9; + */ + TEXT_ENTITY_EXTRACTION_ANNOTATION(9), + UNRECOGNIZED(-1), + ; + + /** ANNOTATION_TYPE_UNSPECIFIED = 0; */ + public static final int ANNOTATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Classification annotations in an image.
+   * 
+ * + * IMAGE_CLASSIFICATION_ANNOTATION = 1; + */ + public static final int IMAGE_CLASSIFICATION_ANNOTATION_VALUE = 1; + /** + * + * + *
+   * Bounding box annotations in an image.
+   * 
+ * + * IMAGE_BOUNDING_BOX_ANNOTATION = 2; + */ + public static final int IMAGE_BOUNDING_BOX_ANNOTATION_VALUE = 2; + /** + * + * + *
+   * Oriented bounding box. The box does not have to be parallel to horizontal
+   * line.
+   * 
+ * + * IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION = 13; + */ + public static final int IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION_VALUE = 13; + /** + * + * + *
+   * Bounding poly annotations in an image.
+   * 
+ * + * IMAGE_BOUNDING_POLY_ANNOTATION = 10; + */ + public static final int IMAGE_BOUNDING_POLY_ANNOTATION_VALUE = 10; + /** + * + * + *
+   * Polyline annotations in an image.
+   * 
+ * + * IMAGE_POLYLINE_ANNOTATION = 11; + */ + public static final int IMAGE_POLYLINE_ANNOTATION_VALUE = 11; + /** + * + * + *
+   * Segmentation annotations in an image.
+   * 
+ * + * IMAGE_SEGMENTATION_ANNOTATION = 12; + */ + public static final int IMAGE_SEGMENTATION_ANNOTATION_VALUE = 12; + /** + * + * + *
+   * Classification annotations in video shots.
+   * 
+ * + * VIDEO_SHOTS_CLASSIFICATION_ANNOTATION = 3; + */ + public static final int VIDEO_SHOTS_CLASSIFICATION_ANNOTATION_VALUE = 3; + /** + * + * + *
+   * Video object tracking annotation.
+   * 
+ * + * VIDEO_OBJECT_TRACKING_ANNOTATION = 4; + */ + public static final int VIDEO_OBJECT_TRACKING_ANNOTATION_VALUE = 4; + /** + * + * + *
+   * Video object detection annotation.
+   * 
+ * + * VIDEO_OBJECT_DETECTION_ANNOTATION = 5; + */ + public static final int VIDEO_OBJECT_DETECTION_ANNOTATION_VALUE = 5; + /** + * + * + *
+   * Video event annotation.
+   * 
+ * + * VIDEO_EVENT_ANNOTATION = 6; + */ + public static final int VIDEO_EVENT_ANNOTATION_VALUE = 6; + /** + * + * + *
+   * Speech to text annotation.
+   * 
+ * + * AUDIO_TRANSCRIPTION_ANNOTATION = 7; + */ + public static final int AUDIO_TRANSCRIPTION_ANNOTATION_VALUE = 7; + /** + * + * + *
+   * Classification for text.
+   * 
+ * + * TEXT_CLASSIFICATION_ANNOTATION = 8; + */ + public static final int TEXT_CLASSIFICATION_ANNOTATION_VALUE = 8; + /** + * + * + *
+   * Entity extraction for text.
+   * 
+ * + * TEXT_ENTITY_EXTRACTION_ANNOTATION = 9; + */ + public static final int TEXT_ENTITY_EXTRACTION_ANNOTATION_VALUE = 9; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static AnnotationType valueOf(int value) { + return forNumber(value); + } + + public static AnnotationType forNumber(int value) { + switch (value) { + case 0: + return ANNOTATION_TYPE_UNSPECIFIED; + case 1: + return IMAGE_CLASSIFICATION_ANNOTATION; + case 2: + return IMAGE_BOUNDING_BOX_ANNOTATION; + case 13: + return IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION; + case 10: + return IMAGE_BOUNDING_POLY_ANNOTATION; + case 11: + return IMAGE_POLYLINE_ANNOTATION; + case 12: + return IMAGE_SEGMENTATION_ANNOTATION; + case 3: + return VIDEO_SHOTS_CLASSIFICATION_ANNOTATION; + case 4: + return VIDEO_OBJECT_TRACKING_ANNOTATION; + case 5: + return VIDEO_OBJECT_DETECTION_ANNOTATION; + case 6: + return VIDEO_EVENT_ANNOTATION; + case 7: + return AUDIO_TRANSCRIPTION_ANNOTATION; + case 8: + return TEXT_CLASSIFICATION_ANNOTATION; + case 9: + return TEXT_ENTITY_EXTRACTION_ANNOTATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AnnotationType findValueByNumber(int number) { + return AnnotationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final AnnotationType[] VALUES = values(); + + public static AnnotationType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AnnotationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datalabeling.v1beta1.AnnotationType) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationValue.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationValue.java new file mode 100644 index 000000000000..d411e4bc7d06 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationValue.java @@ -0,0 +1,3573 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Annotation value for an example.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotationValue} + */ +public final class AnnotationValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.AnnotationValue) + AnnotationValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotationValue.newBuilder() to construct. + private AnnotationValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotationValue() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotationValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.Builder + subBuilder = null; + if (valueTypeCase_ == 1) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) + valueType_) + .toBuilder(); + } + valueType_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) + valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 1; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.Builder subBuilder = + null; + if (valueTypeCase_ == 2) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) valueType_) + .toBuilder(); + } + valueType_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 2; + break; + } + case 26: + { + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.Builder + subBuilder = null; + if (valueTypeCase_ == 3) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) + valueType_) + .toBuilder(); + } + valueType_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) + valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 3; + break; + } + case 34: + { + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.Builder + subBuilder = null; + if (valueTypeCase_ == 4) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) + valueType_) + .toBuilder(); + } + valueType_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) + valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 4; + break; + } + case 42: + { + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.Builder + subBuilder = null; + if (valueTypeCase_ == 5) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) + valueType_) + .toBuilder(); + } + valueType_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) + valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 5; + break; + } + case 50: + { + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.Builder subBuilder = null; + if (valueTypeCase_ == 6) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) valueType_) + .toBuilder(); + } + valueType_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 6; + break; + } + case 58: + { + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.Builder subBuilder = + null; + if (valueTypeCase_ == 7) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) valueType_) + .toBuilder(); + } + valueType_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 7; + break; + } + case 66: + { + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.Builder subBuilder = + null; + if (valueTypeCase_ == 8) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) valueType_) + .toBuilder(); + } + valueType_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 8; + break; + } + case 74: + { + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.Builder subBuilder = + null; + if (valueTypeCase_ == 9) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) valueType_) + .toBuilder(); + } + valueType_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) valueType_); + valueType_ = subBuilder.buildPartial(); + } + valueTypeCase_ = 9; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotationValue.class, + com.google.cloud.datalabeling.v1beta1.AnnotationValue.Builder.class); + } + + private int valueTypeCase_ = 0; + private java.lang.Object valueType_; + + public enum ValueTypeCase implements com.google.protobuf.Internal.EnumLite { + IMAGE_CLASSIFICATION_ANNOTATION(1), + IMAGE_BOUNDING_POLY_ANNOTATION(2), + IMAGE_POLYLINE_ANNOTATION(8), + IMAGE_SEGMENTATION_ANNOTATION(9), + TEXT_CLASSIFICATION_ANNOTATION(3), + VIDEO_CLASSIFICATION_ANNOTATION(4), + VIDEO_OBJECT_TRACKING_ANNOTATION(5), + VIDEO_EVENT_ANNOTATION(6), + AUDIO_RECOGNITION_ANNOTATION(7), + VALUETYPE_NOT_SET(0); + private final int value; + + private ValueTypeCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static ValueTypeCase valueOf(int value) { + return forNumber(value); + } + + public static ValueTypeCase forNumber(int value) { + switch (value) { + case 1: + return IMAGE_CLASSIFICATION_ANNOTATION; + case 2: + return IMAGE_BOUNDING_POLY_ANNOTATION; + case 8: + return IMAGE_POLYLINE_ANNOTATION; + case 9: + return IMAGE_SEGMENTATION_ANNOTATION; + case 3: + return TEXT_CLASSIFICATION_ANNOTATION; + case 4: + return VIDEO_CLASSIFICATION_ANNOTATION; + case 5: + return VIDEO_OBJECT_TRACKING_ANNOTATION; + case 6: + return VIDEO_EVENT_ANNOTATION; + case 7: + return AUDIO_RECOGNITION_ANNOTATION; + case 0: + return VALUETYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ValueTypeCase getValueTypeCase() { + return ValueTypeCase.forNumber(valueTypeCase_); + } + + public static final int IMAGE_CLASSIFICATION_ANNOTATION_FIELD_NUMBER = 1; + /** + * + * + *
+   * Annotation value for image classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + public boolean hasImageClassificationAnnotation() { + return valueTypeCase_ == 1; + } + /** + * + * + *
+   * Annotation value for image classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + getImageClassificationAnnotation() { + if (valueTypeCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.getDefaultInstance(); + } + /** + * + * + *
+   * Annotation value for image classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotationOrBuilder + getImageClassificationAnnotationOrBuilder() { + if (valueTypeCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.getDefaultInstance(); + } + + public static final int IMAGE_BOUNDING_POLY_ANNOTATION_FIELD_NUMBER = 2; + /** + * + * + *
+   * Annotation value for image bounding box, oriented bounding box
+   * and polygon cases.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + public boolean hasImageBoundingPolyAnnotation() { + return valueTypeCase_ == 2; + } + /** + * + * + *
+   * Annotation value for image bounding box, oriented bounding box
+   * and polygon cases.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + getImageBoundingPolyAnnotation() { + if (valueTypeCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.getDefaultInstance(); + } + /** + * + * + *
+   * Annotation value for image bounding box, oriented bounding box
+   * and polygon cases.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotationOrBuilder + getImageBoundingPolyAnnotationOrBuilder() { + if (valueTypeCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.getDefaultInstance(); + } + + public static final int IMAGE_POLYLINE_ANNOTATION_FIELD_NUMBER = 8; + /** + * + * + *
+   * Annotation value for image polyline cases.
+   * Polyline here is different from BoundingPoly. It is formed by
+   * line segments connected to each other but not closed form(Bounding Poly).
+   * The line segments can cross each other.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + public boolean hasImagePolylineAnnotation() { + return valueTypeCase_ == 8; + } + /** + * + * + *
+   * Annotation value for image polyline cases.
+   * Polyline here is different from BoundingPoly. It is formed by
+   * line segments connected to each other but not closed form(Bounding Poly).
+   * The line segments can cross each other.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + getImagePolylineAnnotation() { + if (valueTypeCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.getDefaultInstance(); + } + /** + * + * + *
+   * Annotation value for image polyline cases.
+   * Polyline here is different from BoundingPoly. It is formed by
+   * line segments connected to each other but not closed form(Bounding Poly).
+   * The line segments can cross each other.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotationOrBuilder + getImagePolylineAnnotationOrBuilder() { + if (valueTypeCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.getDefaultInstance(); + } + + public static final int IMAGE_SEGMENTATION_ANNOTATION_FIELD_NUMBER = 9; + /** + * + * + *
+   * Annotation value for image segmentation.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + public boolean hasImageSegmentationAnnotation() { + return valueTypeCase_ == 9; + } + /** + * + * + *
+   * Annotation value for image segmentation.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + getImageSegmentationAnnotation() { + if (valueTypeCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.getDefaultInstance(); + } + /** + * + * + *
+   * Annotation value for image segmentation.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotationOrBuilder + getImageSegmentationAnnotationOrBuilder() { + if (valueTypeCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.getDefaultInstance(); + } + + public static final int TEXT_CLASSIFICATION_ANNOTATION_FIELD_NUMBER = 3; + /** + * + * + *
+   * Annotation value for text classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + public boolean hasTextClassificationAnnotation() { + return valueTypeCase_ == 3; + } + /** + * + * + *
+   * Annotation value for text classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + getTextClassificationAnnotation() { + if (valueTypeCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.getDefaultInstance(); + } + /** + * + * + *
+   * Annotation value for text classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotationOrBuilder + getTextClassificationAnnotationOrBuilder() { + if (valueTypeCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.getDefaultInstance(); + } + + public static final int VIDEO_CLASSIFICATION_ANNOTATION_FIELD_NUMBER = 4; + /** + * + * + *
+   * Annotation value for video classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + public boolean hasVideoClassificationAnnotation() { + return valueTypeCase_ == 4; + } + /** + * + * + *
+   * Annotation value for video classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + getVideoClassificationAnnotation() { + if (valueTypeCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.getDefaultInstance(); + } + /** + * + * + *
+   * Annotation value for video classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotationOrBuilder + getVideoClassificationAnnotationOrBuilder() { + if (valueTypeCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.getDefaultInstance(); + } + + public static final int VIDEO_OBJECT_TRACKING_ANNOTATION_FIELD_NUMBER = 5; + /** + * + * + *
+   * Annotation value for video object detection and tracking case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + public boolean hasVideoObjectTrackingAnnotation() { + return valueTypeCase_ == 5; + } + /** + * + * + *
+   * Annotation value for video object detection and tracking case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + getVideoObjectTrackingAnnotation() { + if (valueTypeCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); + } + /** + * + * + *
+   * Annotation value for video object detection and tracking case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotationOrBuilder + getVideoObjectTrackingAnnotationOrBuilder() { + if (valueTypeCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); + } + + public static final int VIDEO_EVENT_ANNOTATION_FIELD_NUMBER = 6; + /** + * + * + *
+   * Annotation value for video event case.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + public boolean hasVideoEventAnnotation() { + return valueTypeCase_ == 6; + } + /** + * + * + *
+   * Annotation value for video event case.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation getVideoEventAnnotation() { + if (valueTypeCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.getDefaultInstance(); + } + /** + * + * + *
+   * Annotation value for video event case.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoEventAnnotationOrBuilder + getVideoEventAnnotationOrBuilder() { + if (valueTypeCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.getDefaultInstance(); + } + + public static final int AUDIO_RECOGNITION_ANNOTATION_FIELD_NUMBER = 7; + /** + * + * + *
+   * Annotation value for speech audio recognition case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + public boolean hasAudioRecognitionAnnotation() { + return valueTypeCase_ == 7; + } + /** + * + * + *
+   * Annotation value for speech audio recognition case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation + getAudioRecognitionAnnotation() { + if (valueTypeCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.getDefaultInstance(); + } + /** + * + * + *
+   * Annotation value for speech audio recognition case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotationOrBuilder + getAudioRecognitionAnnotationOrBuilder() { + if (valueTypeCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (valueTypeCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) valueType_); + } + if (valueTypeCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) valueType_); + } + if (valueTypeCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) valueType_); + } + if (valueTypeCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) valueType_); + } + if (valueTypeCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) valueType_); + } + if (valueTypeCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) valueType_); + } + if (valueTypeCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) valueType_); + } + if (valueTypeCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) valueType_); + } + if (valueTypeCase_ == 9) { + output.writeMessage( + 9, (com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) valueType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (valueTypeCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) valueType_); + } + if (valueTypeCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) valueType_); + } + if (valueTypeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) valueType_); + } + if (valueTypeCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) valueType_); + } + if (valueTypeCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) valueType_); + } + if (valueTypeCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) valueType_); + } + if (valueTypeCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) valueType_); + } + if (valueTypeCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) valueType_); + } + if (valueTypeCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) valueType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.AnnotationValue)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.AnnotationValue other = + (com.google.cloud.datalabeling.v1beta1.AnnotationValue) obj; + + if (!getValueTypeCase().equals(other.getValueTypeCase())) return false; + switch (valueTypeCase_) { + case 1: + if (!getImageClassificationAnnotation().equals(other.getImageClassificationAnnotation())) + return false; + break; + case 2: + if (!getImageBoundingPolyAnnotation().equals(other.getImageBoundingPolyAnnotation())) + return false; + break; + case 8: + if (!getImagePolylineAnnotation().equals(other.getImagePolylineAnnotation())) return false; + break; + case 9: + if (!getImageSegmentationAnnotation().equals(other.getImageSegmentationAnnotation())) + return false; + break; + case 3: + if (!getTextClassificationAnnotation().equals(other.getTextClassificationAnnotation())) + return false; + break; + case 4: + if (!getVideoClassificationAnnotation().equals(other.getVideoClassificationAnnotation())) + return false; + break; + case 5: + if (!getVideoObjectTrackingAnnotation().equals(other.getVideoObjectTrackingAnnotation())) + return false; + break; + case 6: + if (!getVideoEventAnnotation().equals(other.getVideoEventAnnotation())) return false; + break; + case 7: + if (!getAudioRecognitionAnnotation().equals(other.getAudioRecognitionAnnotation())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (valueTypeCase_) { + case 1: + hash = (37 * hash) + IMAGE_CLASSIFICATION_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getImageClassificationAnnotation().hashCode(); + break; + case 2: + hash = (37 * hash) + IMAGE_BOUNDING_POLY_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getImageBoundingPolyAnnotation().hashCode(); + break; + case 8: + hash = (37 * hash) + IMAGE_POLYLINE_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getImagePolylineAnnotation().hashCode(); + break; + case 9: + hash = (37 * hash) + IMAGE_SEGMENTATION_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getImageSegmentationAnnotation().hashCode(); + break; + case 3: + hash = (37 * hash) + TEXT_CLASSIFICATION_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getTextClassificationAnnotation().hashCode(); + break; + case 4: + hash = (37 * hash) + VIDEO_CLASSIFICATION_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getVideoClassificationAnnotation().hashCode(); + break; + case 5: + hash = (37 * hash) + VIDEO_OBJECT_TRACKING_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getVideoObjectTrackingAnnotation().hashCode(); + break; + case 6: + hash = (37 * hash) + VIDEO_EVENT_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getVideoEventAnnotation().hashCode(); + break; + case 7: + hash = (37 * hash) + AUDIO_RECOGNITION_ANNOTATION_FIELD_NUMBER; + hash = (53 * hash) + getAudioRecognitionAnnotation().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.AnnotationValue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Annotation value for an example.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AnnotationValue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.AnnotationValue) + com.google.cloud.datalabeling.v1beta1.AnnotationValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AnnotationValue.class, + com.google.cloud.datalabeling.v1beta1.AnnotationValue.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.AnnotationValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + valueTypeCase_ = 0; + valueType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AnnotationValue_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationValue getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationValue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationValue build() { + com.google.cloud.datalabeling.v1beta1.AnnotationValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationValue buildPartial() { + com.google.cloud.datalabeling.v1beta1.AnnotationValue result = + new com.google.cloud.datalabeling.v1beta1.AnnotationValue(this); + if (valueTypeCase_ == 1) { + if (imageClassificationAnnotationBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = imageClassificationAnnotationBuilder_.build(); + } + } + if (valueTypeCase_ == 2) { + if (imageBoundingPolyAnnotationBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = imageBoundingPolyAnnotationBuilder_.build(); + } + } + if (valueTypeCase_ == 8) { + if (imagePolylineAnnotationBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = imagePolylineAnnotationBuilder_.build(); + } + } + if (valueTypeCase_ == 9) { + if (imageSegmentationAnnotationBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = imageSegmentationAnnotationBuilder_.build(); + } + } + if (valueTypeCase_ == 3) { + if (textClassificationAnnotationBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = textClassificationAnnotationBuilder_.build(); + } + } + if (valueTypeCase_ == 4) { + if (videoClassificationAnnotationBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = videoClassificationAnnotationBuilder_.build(); + } + } + if (valueTypeCase_ == 5) { + if (videoObjectTrackingAnnotationBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = videoObjectTrackingAnnotationBuilder_.build(); + } + } + if (valueTypeCase_ == 6) { + if (videoEventAnnotationBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = videoEventAnnotationBuilder_.build(); + } + } + if (valueTypeCase_ == 7) { + if (audioRecognitionAnnotationBuilder_ == null) { + result.valueType_ = valueType_; + } else { + result.valueType_ = audioRecognitionAnnotationBuilder_.build(); + } + } + result.valueTypeCase_ = valueTypeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.AnnotationValue) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.AnnotationValue) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.AnnotationValue other) { + if (other == com.google.cloud.datalabeling.v1beta1.AnnotationValue.getDefaultInstance()) + return this; + switch (other.getValueTypeCase()) { + case IMAGE_CLASSIFICATION_ANNOTATION: + { + mergeImageClassificationAnnotation(other.getImageClassificationAnnotation()); + break; + } + case IMAGE_BOUNDING_POLY_ANNOTATION: + { + mergeImageBoundingPolyAnnotation(other.getImageBoundingPolyAnnotation()); + break; + } + case IMAGE_POLYLINE_ANNOTATION: + { + mergeImagePolylineAnnotation(other.getImagePolylineAnnotation()); + break; + } + case IMAGE_SEGMENTATION_ANNOTATION: + { + mergeImageSegmentationAnnotation(other.getImageSegmentationAnnotation()); + break; + } + case TEXT_CLASSIFICATION_ANNOTATION: + { + mergeTextClassificationAnnotation(other.getTextClassificationAnnotation()); + break; + } + case VIDEO_CLASSIFICATION_ANNOTATION: + { + mergeVideoClassificationAnnotation(other.getVideoClassificationAnnotation()); + break; + } + case VIDEO_OBJECT_TRACKING_ANNOTATION: + { + mergeVideoObjectTrackingAnnotation(other.getVideoObjectTrackingAnnotation()); + break; + } + case VIDEO_EVENT_ANNOTATION: + { + mergeVideoEventAnnotation(other.getVideoEventAnnotation()); + break; + } + case AUDIO_RECOGNITION_ANNOTATION: + { + mergeAudioRecognitionAnnotation(other.getAudioRecognitionAnnotation()); + break; + } + case VALUETYPE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.AnnotationValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.AnnotationValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int valueTypeCase_ = 0; + private java.lang.Object valueType_; + + public ValueTypeCase getValueTypeCase() { + return ValueTypeCase.forNumber(valueTypeCase_); + } + + public Builder clearValueType() { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation, + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotationOrBuilder> + imageClassificationAnnotationBuilder_; + /** + * + * + *
+     * Annotation value for image classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + public boolean hasImageClassificationAnnotation() { + return valueTypeCase_ == 1; + } + /** + * + * + *
+     * Annotation value for image classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + getImageClassificationAnnotation() { + if (imageClassificationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + .getDefaultInstance(); + } else { + if (valueTypeCase_ == 1) { + return imageClassificationAnnotationBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for image classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + public Builder setImageClassificationAnnotation( + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation value) { + if (imageClassificationAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + imageClassificationAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 1; + return this; + } + /** + * + * + *
+     * Annotation value for image classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + public Builder setImageClassificationAnnotation( + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.Builder + builderForValue) { + if (imageClassificationAnnotationBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + imageClassificationAnnotationBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 1; + return this; + } + /** + * + * + *
+     * Annotation value for image classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + public Builder mergeImageClassificationAnnotation( + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation value) { + if (imageClassificationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 1 + && valueType_ + != com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + .getDefaultInstance()) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) + valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 1) { + imageClassificationAnnotationBuilder_.mergeFrom(value); + } + imageClassificationAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 1; + return this; + } + /** + * + * + *
+     * Annotation value for image classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + public Builder clearImageClassificationAnnotation() { + if (imageClassificationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 1) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 1) { + valueTypeCase_ = 0; + valueType_ = null; + } + imageClassificationAnnotationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotation value for image classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.Builder + getImageClassificationAnnotationBuilder() { + return getImageClassificationAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Annotation value for image classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotationOrBuilder + getImageClassificationAnnotationOrBuilder() { + if ((valueTypeCase_ == 1) && (imageClassificationAnnotationBuilder_ != null)) { + return imageClassificationAnnotationBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for image classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation, + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotationOrBuilder> + getImageClassificationAnnotationFieldBuilder() { + if (imageClassificationAnnotationBuilder_ == null) { + if (!(valueTypeCase_ == 1)) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + .getDefaultInstance(); + } + imageClassificationAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation, + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotationOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 1; + onChanged(); + ; + return imageClassificationAnnotationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation, + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotationOrBuilder> + imageBoundingPolyAnnotationBuilder_; + /** + * + * + *
+     * Annotation value for image bounding box, oriented bounding box
+     * and polygon cases.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + public boolean hasImageBoundingPolyAnnotation() { + return valueTypeCase_ == 2; + } + /** + * + * + *
+     * Annotation value for image bounding box, oriented bounding box
+     * and polygon cases.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + getImageBoundingPolyAnnotation() { + if (imageBoundingPolyAnnotationBuilder_ == null) { + if (valueTypeCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + .getDefaultInstance(); + } else { + if (valueTypeCase_ == 2) { + return imageBoundingPolyAnnotationBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for image bounding box, oriented bounding box
+     * and polygon cases.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + public Builder setImageBoundingPolyAnnotation( + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation value) { + if (imageBoundingPolyAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + imageBoundingPolyAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Annotation value for image bounding box, oriented bounding box
+     * and polygon cases.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + public Builder setImageBoundingPolyAnnotation( + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.Builder builderForValue) { + if (imageBoundingPolyAnnotationBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + imageBoundingPolyAnnotationBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Annotation value for image bounding box, oriented bounding box
+     * and polygon cases.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + public Builder mergeImageBoundingPolyAnnotation( + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation value) { + if (imageBoundingPolyAnnotationBuilder_ == null) { + if (valueTypeCase_ == 2 + && valueType_ + != com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + .getDefaultInstance()) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) + valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 2) { + imageBoundingPolyAnnotationBuilder_.mergeFrom(value); + } + imageBoundingPolyAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 2; + return this; + } + /** + * + * + *
+     * Annotation value for image bounding box, oriented bounding box
+     * and polygon cases.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + public Builder clearImageBoundingPolyAnnotation() { + if (imageBoundingPolyAnnotationBuilder_ == null) { + if (valueTypeCase_ == 2) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 2) { + valueTypeCase_ = 0; + valueType_ = null; + } + imageBoundingPolyAnnotationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotation value for image bounding box, oriented bounding box
+     * and polygon cases.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.Builder + getImageBoundingPolyAnnotationBuilder() { + return getImageBoundingPolyAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Annotation value for image bounding box, oriented bounding box
+     * and polygon cases.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotationOrBuilder + getImageBoundingPolyAnnotationOrBuilder() { + if ((valueTypeCase_ == 2) && (imageBoundingPolyAnnotationBuilder_ != null)) { + return imageBoundingPolyAnnotationBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for image bounding box, oriented bounding box
+     * and polygon cases.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation, + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotationOrBuilder> + getImageBoundingPolyAnnotationFieldBuilder() { + if (imageBoundingPolyAnnotationBuilder_ == null) { + if (!(valueTypeCase_ == 2)) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + .getDefaultInstance(); + } + imageBoundingPolyAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation, + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotationOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 2; + onChanged(); + ; + return imageBoundingPolyAnnotationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation, + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotationOrBuilder> + imagePolylineAnnotationBuilder_; + /** + * + * + *
+     * Annotation value for image polyline cases.
+     * Polyline here is different from BoundingPoly. It is formed by
+     * line segments connected to each other but not closed form(Bounding Poly).
+     * The line segments can cross each other.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + public boolean hasImagePolylineAnnotation() { + return valueTypeCase_ == 8; + } + /** + * + * + *
+     * Annotation value for image polyline cases.
+     * Polyline here is different from BoundingPoly. It is formed by
+     * line segments connected to each other but not closed form(Bounding Poly).
+     * The line segments can cross each other.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + getImagePolylineAnnotation() { + if (imagePolylineAnnotationBuilder_ == null) { + if (valueTypeCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.getDefaultInstance(); + } else { + if (valueTypeCase_ == 8) { + return imagePolylineAnnotationBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for image polyline cases.
+     * Polyline here is different from BoundingPoly. It is formed by
+     * line segments connected to each other but not closed form(Bounding Poly).
+     * The line segments can cross each other.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + public Builder setImagePolylineAnnotation( + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation value) { + if (imagePolylineAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + imagePolylineAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * Annotation value for image polyline cases.
+     * Polyline here is different from BoundingPoly. It is formed by
+     * line segments connected to each other but not closed form(Bounding Poly).
+     * The line segments can cross each other.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + public Builder setImagePolylineAnnotation( + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.Builder builderForValue) { + if (imagePolylineAnnotationBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + imagePolylineAnnotationBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * Annotation value for image polyline cases.
+     * Polyline here is different from BoundingPoly. It is formed by
+     * line segments connected to each other but not closed form(Bounding Poly).
+     * The line segments can cross each other.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + public Builder mergeImagePolylineAnnotation( + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation value) { + if (imagePolylineAnnotationBuilder_ == null) { + if (valueTypeCase_ == 8 + && valueType_ + != com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + .getDefaultInstance()) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 8) { + imagePolylineAnnotationBuilder_.mergeFrom(value); + } + imagePolylineAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 8; + return this; + } + /** + * + * + *
+     * Annotation value for image polyline cases.
+     * Polyline here is different from BoundingPoly. It is formed by
+     * line segments connected to each other but not closed form(Bounding Poly).
+     * The line segments can cross each other.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + public Builder clearImagePolylineAnnotation() { + if (imagePolylineAnnotationBuilder_ == null) { + if (valueTypeCase_ == 8) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 8) { + valueTypeCase_ = 0; + valueType_ = null; + } + imagePolylineAnnotationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotation value for image polyline cases.
+     * Polyline here is different from BoundingPoly. It is formed by
+     * line segments connected to each other but not closed form(Bounding Poly).
+     * The line segments can cross each other.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.Builder + getImagePolylineAnnotationBuilder() { + return getImagePolylineAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Annotation value for image polyline cases.
+     * Polyline here is different from BoundingPoly. It is formed by
+     * line segments connected to each other but not closed form(Bounding Poly).
+     * The line segments can cross each other.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotationOrBuilder + getImagePolylineAnnotationOrBuilder() { + if ((valueTypeCase_ == 8) && (imagePolylineAnnotationBuilder_ != null)) { + return imagePolylineAnnotationBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for image polyline cases.
+     * Polyline here is different from BoundingPoly. It is formed by
+     * line segments connected to each other but not closed form(Bounding Poly).
+     * The line segments can cross each other.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation, + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotationOrBuilder> + getImagePolylineAnnotationFieldBuilder() { + if (imagePolylineAnnotationBuilder_ == null) { + if (!(valueTypeCase_ == 8)) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.getDefaultInstance(); + } + imagePolylineAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation, + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotationOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 8; + onChanged(); + ; + return imagePolylineAnnotationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation, + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotationOrBuilder> + imageSegmentationAnnotationBuilder_; + /** + * + * + *
+     * Annotation value for image segmentation.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + public boolean hasImageSegmentationAnnotation() { + return valueTypeCase_ == 9; + } + /** + * + * + *
+     * Annotation value for image segmentation.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + getImageSegmentationAnnotation() { + if (imageSegmentationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + .getDefaultInstance(); + } else { + if (valueTypeCase_ == 9) { + return imageSegmentationAnnotationBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for image segmentation.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + public Builder setImageSegmentationAnnotation( + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation value) { + if (imageSegmentationAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + imageSegmentationAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 9; + return this; + } + /** + * + * + *
+     * Annotation value for image segmentation.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + public Builder setImageSegmentationAnnotation( + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.Builder builderForValue) { + if (imageSegmentationAnnotationBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + imageSegmentationAnnotationBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 9; + return this; + } + /** + * + * + *
+     * Annotation value for image segmentation.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + public Builder mergeImageSegmentationAnnotation( + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation value) { + if (imageSegmentationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 9 + && valueType_ + != com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + .getDefaultInstance()) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) + valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 9) { + imageSegmentationAnnotationBuilder_.mergeFrom(value); + } + imageSegmentationAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 9; + return this; + } + /** + * + * + *
+     * Annotation value for image segmentation.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + public Builder clearImageSegmentationAnnotation() { + if (imageSegmentationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 9) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 9) { + valueTypeCase_ = 0; + valueType_ = null; + } + imageSegmentationAnnotationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotation value for image segmentation.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.Builder + getImageSegmentationAnnotationBuilder() { + return getImageSegmentationAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Annotation value for image segmentation.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotationOrBuilder + getImageSegmentationAnnotationOrBuilder() { + if ((valueTypeCase_ == 9) && (imageSegmentationAnnotationBuilder_ != null)) { + return imageSegmentationAnnotationBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for image segmentation.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation, + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotationOrBuilder> + getImageSegmentationAnnotationFieldBuilder() { + if (imageSegmentationAnnotationBuilder_ == null) { + if (!(valueTypeCase_ == 9)) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + .getDefaultInstance(); + } + imageSegmentationAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation, + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotationOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 9; + onChanged(); + ; + return imageSegmentationAnnotationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation, + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotationOrBuilder> + textClassificationAnnotationBuilder_; + /** + * + * + *
+     * Annotation value for text classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + public boolean hasTextClassificationAnnotation() { + return valueTypeCase_ == 3; + } + /** + * + * + *
+     * Annotation value for text classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + getTextClassificationAnnotation() { + if (textClassificationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + .getDefaultInstance(); + } else { + if (valueTypeCase_ == 3) { + return textClassificationAnnotationBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for text classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + public Builder setTextClassificationAnnotation( + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation value) { + if (textClassificationAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + textClassificationAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 3; + return this; + } + /** + * + * + *
+     * Annotation value for text classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + public Builder setTextClassificationAnnotation( + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.Builder + builderForValue) { + if (textClassificationAnnotationBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + textClassificationAnnotationBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 3; + return this; + } + /** + * + * + *
+     * Annotation value for text classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + public Builder mergeTextClassificationAnnotation( + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation value) { + if (textClassificationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 3 + && valueType_ + != com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + .getDefaultInstance()) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.newBuilder( + (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) + valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 3) { + textClassificationAnnotationBuilder_.mergeFrom(value); + } + textClassificationAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 3; + return this; + } + /** + * + * + *
+     * Annotation value for text classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + public Builder clearTextClassificationAnnotation() { + if (textClassificationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 3) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 3) { + valueTypeCase_ = 0; + valueType_ = null; + } + textClassificationAnnotationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotation value for text classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.Builder + getTextClassificationAnnotationBuilder() { + return getTextClassificationAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Annotation value for text classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotationOrBuilder + getTextClassificationAnnotationOrBuilder() { + if ((valueTypeCase_ == 3) && (textClassificationAnnotationBuilder_ != null)) { + return textClassificationAnnotationBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for text classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation, + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotationOrBuilder> + getTextClassificationAnnotationFieldBuilder() { + if (textClassificationAnnotationBuilder_ == null) { + if (!(valueTypeCase_ == 3)) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + .getDefaultInstance(); + } + textClassificationAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation, + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotationOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 3; + onChanged(); + ; + return textClassificationAnnotationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation, + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotationOrBuilder> + videoClassificationAnnotationBuilder_; + /** + * + * + *
+     * Annotation value for video classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + public boolean hasVideoClassificationAnnotation() { + return valueTypeCase_ == 4; + } + /** + * + * + *
+     * Annotation value for video classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + getVideoClassificationAnnotation() { + if (videoClassificationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + .getDefaultInstance(); + } else { + if (valueTypeCase_ == 4) { + return videoClassificationAnnotationBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for video classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + public Builder setVideoClassificationAnnotation( + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation value) { + if (videoClassificationAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + videoClassificationAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Annotation value for video classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + public Builder setVideoClassificationAnnotation( + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.Builder + builderForValue) { + if (videoClassificationAnnotationBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + videoClassificationAnnotationBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Annotation value for video classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + public Builder mergeVideoClassificationAnnotation( + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation value) { + if (videoClassificationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 4 + && valueType_ + != com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + .getDefaultInstance()) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.newBuilder( + (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) + valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 4) { + videoClassificationAnnotationBuilder_.mergeFrom(value); + } + videoClassificationAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 4; + return this; + } + /** + * + * + *
+     * Annotation value for video classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + public Builder clearVideoClassificationAnnotation() { + if (videoClassificationAnnotationBuilder_ == null) { + if (valueTypeCase_ == 4) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 4) { + valueTypeCase_ = 0; + valueType_ = null; + } + videoClassificationAnnotationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotation value for video classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.Builder + getVideoClassificationAnnotationBuilder() { + return getVideoClassificationAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Annotation value for video classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotationOrBuilder + getVideoClassificationAnnotationOrBuilder() { + if ((valueTypeCase_ == 4) && (videoClassificationAnnotationBuilder_ != null)) { + return videoClassificationAnnotationBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for video classification case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation, + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotationOrBuilder> + getVideoClassificationAnnotationFieldBuilder() { + if (videoClassificationAnnotationBuilder_ == null) { + if (!(valueTypeCase_ == 4)) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + .getDefaultInstance(); + } + videoClassificationAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation, + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotationOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 4; + onChanged(); + ; + return videoClassificationAnnotationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation, + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotationOrBuilder> + videoObjectTrackingAnnotationBuilder_; + /** + * + * + *
+     * Annotation value for video object detection and tracking case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + public boolean hasVideoObjectTrackingAnnotation() { + return valueTypeCase_ == 5; + } + /** + * + * + *
+     * Annotation value for video object detection and tracking case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + getVideoObjectTrackingAnnotation() { + if (videoObjectTrackingAnnotationBuilder_ == null) { + if (valueTypeCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + .getDefaultInstance(); + } else { + if (valueTypeCase_ == 5) { + return videoObjectTrackingAnnotationBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for video object detection and tracking case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + public Builder setVideoObjectTrackingAnnotation( + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation value) { + if (videoObjectTrackingAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + videoObjectTrackingAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 5; + return this; + } + /** + * + * + *
+     * Annotation value for video object detection and tracking case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + public Builder setVideoObjectTrackingAnnotation( + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.Builder + builderForValue) { + if (videoObjectTrackingAnnotationBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + videoObjectTrackingAnnotationBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 5; + return this; + } + /** + * + * + *
+     * Annotation value for video object detection and tracking case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + public Builder mergeVideoObjectTrackingAnnotation( + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation value) { + if (videoObjectTrackingAnnotationBuilder_ == null) { + if (valueTypeCase_ == 5 + && valueType_ + != com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + .getDefaultInstance()) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.newBuilder( + (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) + valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 5) { + videoObjectTrackingAnnotationBuilder_.mergeFrom(value); + } + videoObjectTrackingAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 5; + return this; + } + /** + * + * + *
+     * Annotation value for video object detection and tracking case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + public Builder clearVideoObjectTrackingAnnotation() { + if (videoObjectTrackingAnnotationBuilder_ == null) { + if (valueTypeCase_ == 5) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 5) { + valueTypeCase_ = 0; + valueType_ = null; + } + videoObjectTrackingAnnotationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotation value for video object detection and tracking case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.Builder + getVideoObjectTrackingAnnotationBuilder() { + return getVideoObjectTrackingAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Annotation value for video object detection and tracking case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotationOrBuilder + getVideoObjectTrackingAnnotationOrBuilder() { + if ((valueTypeCase_ == 5) && (videoObjectTrackingAnnotationBuilder_ != null)) { + return videoObjectTrackingAnnotationBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for video object detection and tracking case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation, + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotationOrBuilder> + getVideoObjectTrackingAnnotationFieldBuilder() { + if (videoObjectTrackingAnnotationBuilder_ == null) { + if (!(valueTypeCase_ == 5)) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + .getDefaultInstance(); + } + videoObjectTrackingAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation, + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotationOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 5; + onChanged(); + ; + return videoObjectTrackingAnnotationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation, + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotationOrBuilder> + videoEventAnnotationBuilder_; + /** + * + * + *
+     * Annotation value for video event case.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + public boolean hasVideoEventAnnotation() { + return valueTypeCase_ == 6; + } + /** + * + * + *
+     * Annotation value for video event case.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation getVideoEventAnnotation() { + if (videoEventAnnotationBuilder_ == null) { + if (valueTypeCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.getDefaultInstance(); + } else { + if (valueTypeCase_ == 6) { + return videoEventAnnotationBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for video event case.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + public Builder setVideoEventAnnotation( + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation value) { + if (videoEventAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + videoEventAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Annotation value for video event case.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + public Builder setVideoEventAnnotation( + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.Builder builderForValue) { + if (videoEventAnnotationBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + videoEventAnnotationBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Annotation value for video event case.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + public Builder mergeVideoEventAnnotation( + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation value) { + if (videoEventAnnotationBuilder_ == null) { + if (valueTypeCase_ == 6 + && valueType_ + != com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation + .getDefaultInstance()) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.newBuilder( + (com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 6) { + videoEventAnnotationBuilder_.mergeFrom(value); + } + videoEventAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 6; + return this; + } + /** + * + * + *
+     * Annotation value for video event case.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + public Builder clearVideoEventAnnotation() { + if (videoEventAnnotationBuilder_ == null) { + if (valueTypeCase_ == 6) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 6) { + valueTypeCase_ = 0; + valueType_ = null; + } + videoEventAnnotationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotation value for video event case.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.Builder + getVideoEventAnnotationBuilder() { + return getVideoEventAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Annotation value for video event case.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoEventAnnotationOrBuilder + getVideoEventAnnotationOrBuilder() { + if ((valueTypeCase_ == 6) && (videoEventAnnotationBuilder_ != null)) { + return videoEventAnnotationBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for video event case.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation, + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotationOrBuilder> + getVideoEventAnnotationFieldBuilder() { + if (videoEventAnnotationBuilder_ == null) { + if (!(valueTypeCase_ == 6)) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.getDefaultInstance(); + } + videoEventAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation, + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotationOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 6; + onChanged(); + ; + return videoEventAnnotationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation, + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotationOrBuilder> + audioRecognitionAnnotationBuilder_; + /** + * + * + *
+     * Annotation value for speech audio recognition case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + public boolean hasAudioRecognitionAnnotation() { + return valueTypeCase_ == 7; + } + /** + * + * + *
+     * Annotation value for speech audio recognition case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation + getAudioRecognitionAnnotation() { + if (audioRecognitionAnnotationBuilder_ == null) { + if (valueTypeCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation + .getDefaultInstance(); + } else { + if (valueTypeCase_ == 7) { + return audioRecognitionAnnotationBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for speech audio recognition case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + public Builder setAudioRecognitionAnnotation( + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation value) { + if (audioRecognitionAnnotationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + valueType_ = value; + onChanged(); + } else { + audioRecognitionAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Annotation value for speech audio recognition case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + public Builder setAudioRecognitionAnnotation( + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.Builder builderForValue) { + if (audioRecognitionAnnotationBuilder_ == null) { + valueType_ = builderForValue.build(); + onChanged(); + } else { + audioRecognitionAnnotationBuilder_.setMessage(builderForValue.build()); + } + valueTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Annotation value for speech audio recognition case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + public Builder mergeAudioRecognitionAnnotation( + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation value) { + if (audioRecognitionAnnotationBuilder_ == null) { + if (valueTypeCase_ == 7 + && valueType_ + != com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation + .getDefaultInstance()) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.newBuilder( + (com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) valueType_) + .mergeFrom(value) + .buildPartial(); + } else { + valueType_ = value; + } + onChanged(); + } else { + if (valueTypeCase_ == 7) { + audioRecognitionAnnotationBuilder_.mergeFrom(value); + } + audioRecognitionAnnotationBuilder_.setMessage(value); + } + valueTypeCase_ = 7; + return this; + } + /** + * + * + *
+     * Annotation value for speech audio recognition case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + public Builder clearAudioRecognitionAnnotation() { + if (audioRecognitionAnnotationBuilder_ == null) { + if (valueTypeCase_ == 7) { + valueTypeCase_ = 0; + valueType_ = null; + onChanged(); + } + } else { + if (valueTypeCase_ == 7) { + valueTypeCase_ = 0; + valueType_ = null; + } + audioRecognitionAnnotationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Annotation value for speech audio recognition case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.Builder + getAudioRecognitionAnnotationBuilder() { + return getAudioRecognitionAnnotationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Annotation value for speech audio recognition case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotationOrBuilder + getAudioRecognitionAnnotationOrBuilder() { + if ((valueTypeCase_ == 7) && (audioRecognitionAnnotationBuilder_ != null)) { + return audioRecognitionAnnotationBuilder_.getMessageOrBuilder(); + } else { + if (valueTypeCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) valueType_; + } + return com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Annotation value for speech audio recognition case.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation, + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotationOrBuilder> + getAudioRecognitionAnnotationFieldBuilder() { + if (audioRecognitionAnnotationBuilder_ == null) { + if (!(valueTypeCase_ == 7)) { + valueType_ = + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.getDefaultInstance(); + } + audioRecognitionAnnotationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation, + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.Builder, + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotationOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) valueType_, + getParentForChildren(), + isClean()); + valueType_ = null; + } + valueTypeCase_ = 7; + onChanged(); + ; + return audioRecognitionAnnotationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.AnnotationValue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.AnnotationValue) + private static final com.google.cloud.datalabeling.v1beta1.AnnotationValue DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.AnnotationValue(); + } + + public static com.google.cloud.datalabeling.v1beta1.AnnotationValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotationValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AnnotationValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationValueOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationValueOrBuilder.java new file mode 100644 index 000000000000..46dba7ba4441 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AnnotationValueOrBuilder.java @@ -0,0 +1,366 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface AnnotationValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.AnnotationValue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Annotation value for image classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + boolean hasImageClassificationAnnotation(); + /** + * + * + *
+   * Annotation value for image classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + getImageClassificationAnnotation(); + /** + * + * + *
+   * Annotation value for image classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotationOrBuilder + getImageClassificationAnnotationOrBuilder(); + + /** + * + * + *
+   * Annotation value for image bounding box, oriented bounding box
+   * and polygon cases.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + boolean hasImageBoundingPolyAnnotation(); + /** + * + * + *
+   * Annotation value for image bounding box, oriented bounding box
+   * and polygon cases.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + getImageBoundingPolyAnnotation(); + /** + * + * + *
+   * Annotation value for image bounding box, oriented bounding box
+   * and polygon cases.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + * + */ + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotationOrBuilder + getImageBoundingPolyAnnotationOrBuilder(); + + /** + * + * + *
+   * Annotation value for image polyline cases.
+   * Polyline here is different from BoundingPoly. It is formed by
+   * line segments connected to each other but not closed form(Bounding Poly).
+   * The line segments can cross each other.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + boolean hasImagePolylineAnnotation(); + /** + * + * + *
+   * Annotation value for image polyline cases.
+   * Polyline here is different from BoundingPoly. It is formed by
+   * line segments connected to each other but not closed form(Bounding Poly).
+   * The line segments can cross each other.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation getImagePolylineAnnotation(); + /** + * + * + *
+   * Annotation value for image polyline cases.
+   * Polyline here is different from BoundingPoly. It is formed by
+   * line segments connected to each other but not closed form(Bounding Poly).
+   * The line segments can cross each other.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8; + * + */ + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotationOrBuilder + getImagePolylineAnnotationOrBuilder(); + + /** + * + * + *
+   * Annotation value for image segmentation.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + boolean hasImageSegmentationAnnotation(); + /** + * + * + *
+   * Annotation value for image segmentation.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + getImageSegmentationAnnotation(); + /** + * + * + *
+   * Annotation value for image segmentation.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9; + * + */ + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotationOrBuilder + getImageSegmentationAnnotationOrBuilder(); + + /** + * + * + *
+   * Annotation value for text classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + boolean hasTextClassificationAnnotation(); + /** + * + * + *
+   * Annotation value for text classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + getTextClassificationAnnotation(); + /** + * + * + *
+   * Annotation value for text classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3; + * + */ + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotationOrBuilder + getTextClassificationAnnotationOrBuilder(); + + /** + * + * + *
+   * Annotation value for video classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + boolean hasVideoClassificationAnnotation(); + /** + * + * + *
+   * Annotation value for video classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + getVideoClassificationAnnotation(); + /** + * + * + *
+   * Annotation value for video classification case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotationOrBuilder + getVideoClassificationAnnotationOrBuilder(); + + /** + * + * + *
+   * Annotation value for video object detection and tracking case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + boolean hasVideoObjectTrackingAnnotation(); + /** + * + * + *
+   * Annotation value for video object detection and tracking case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + getVideoObjectTrackingAnnotation(); + /** + * + * + *
+   * Annotation value for video object detection and tracking case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotationOrBuilder + getVideoObjectTrackingAnnotationOrBuilder(); + + /** + * + * + *
+   * Annotation value for video event case.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + boolean hasVideoEventAnnotation(); + /** + * + * + *
+   * Annotation value for video event case.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation getVideoEventAnnotation(); + /** + * + * + *
+   * Annotation value for video event case.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotationOrBuilder + getVideoEventAnnotationOrBuilder(); + + /** + * + * + *
+   * Annotation value for speech audio recognition case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + boolean hasAudioRecognitionAnnotation(); + /** + * + * + *
+   * Annotation value for speech audio recognition case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation getAudioRecognitionAnnotation(); + /** + * + * + *
+   * Annotation value for speech audio recognition case.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation audio_recognition_annotation = 7; + * + */ + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotationOrBuilder + getAudioRecognitionAnnotationOrBuilder(); + + public com.google.cloud.datalabeling.v1beta1.AnnotationValue.ValueTypeCase getValueTypeCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioPayload.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioPayload.java new file mode 100644 index 000000000000..ab054a309d2f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioPayload.java @@ -0,0 +1,689 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Container of information of an audio.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AudioPayload} + */ +public final class AudioPayload extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.AudioPayload) + AudioPayloadOrBuilder { + private static final long serialVersionUID = 0L; + // Use AudioPayload.newBuilder() to construct. + private AudioPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AudioPayload() { + audioUri_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AudioPayload( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + audioUri_ = s; + break; + } + case 24: + { + sampleRateHertz_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AudioPayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AudioPayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AudioPayload.class, + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder.class); + } + + public static final int AUDIO_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object audioUri_; + /** + * + * + *
+   * Audio uri in user bucket.
+   * 
+ * + * string audio_uri = 1; + */ + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; + } + } + /** + * + * + *
+   * Audio uri in user bucket.
+   * 
+ * + * string audio_uri = 1; + */ + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SAMPLE_RATE_HERTZ_FIELD_NUMBER = 3; + private int sampleRateHertz_; + /** + * + * + *
+   * Sample rate in Hertz of the audio data sent in all
+   * `RecognitionAudio` messages. This field is optional for `FLAC` and `WAV`
+   * audio files and required for all other audio formats. For details,
+   * see [AudioEncoding][google.cloud.datalabeling.v1beta1.AudioPayload.AudioEncoding].
+   * 
+ * + * int32 sample_rate_hertz = 3; + */ + public int getSampleRateHertz() { + return sampleRateHertz_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAudioUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_); + } + if (sampleRateHertz_ != 0) { + output.writeInt32(3, sampleRateHertz_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAudioUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_); + } + if (sampleRateHertz_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, sampleRateHertz_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.AudioPayload)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.AudioPayload other = + (com.google.cloud.datalabeling.v1beta1.AudioPayload) obj; + + if (!getAudioUri().equals(other.getAudioUri())) return false; + if (getSampleRateHertz() != other.getSampleRateHertz()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AUDIO_URI_FIELD_NUMBER; + hash = (53 * hash) + getAudioUri().hashCode(); + hash = (37 * hash) + SAMPLE_RATE_HERTZ_FIELD_NUMBER; + hash = (53 * hash) + getSampleRateHertz(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.AudioPayload prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Container of information of an audio.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AudioPayload} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.AudioPayload) + com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AudioPayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AudioPayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AudioPayload.class, + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.AudioPayload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + audioUri_ = ""; + + sampleRateHertz_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AudioPayload_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AudioPayload getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AudioPayload build() { + com.google.cloud.datalabeling.v1beta1.AudioPayload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AudioPayload buildPartial() { + com.google.cloud.datalabeling.v1beta1.AudioPayload result = + new com.google.cloud.datalabeling.v1beta1.AudioPayload(this); + result.audioUri_ = audioUri_; + result.sampleRateHertz_ = sampleRateHertz_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.AudioPayload) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.AudioPayload) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.AudioPayload other) { + if (other == com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance()) + return this; + if (!other.getAudioUri().isEmpty()) { + audioUri_ = other.audioUri_; + onChanged(); + } + if (other.getSampleRateHertz() != 0) { + setSampleRateHertz(other.getSampleRateHertz()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.AudioPayload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.AudioPayload) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object audioUri_ = ""; + /** + * + * + *
+     * Audio uri in user bucket.
+     * 
+ * + * string audio_uri = 1; + */ + public java.lang.String getAudioUri() { + java.lang.Object ref = audioUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + audioUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Audio uri in user bucket.
+     * 
+ * + * string audio_uri = 1; + */ + public com.google.protobuf.ByteString getAudioUriBytes() { + java.lang.Object ref = audioUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + audioUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Audio uri in user bucket.
+     * 
+ * + * string audio_uri = 1; + */ + public Builder setAudioUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + audioUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Audio uri in user bucket.
+     * 
+ * + * string audio_uri = 1; + */ + public Builder clearAudioUri() { + + audioUri_ = getDefaultInstance().getAudioUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Audio uri in user bucket.
+     * 
+ * + * string audio_uri = 1; + */ + public Builder setAudioUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + audioUri_ = value; + onChanged(); + return this; + } + + private int sampleRateHertz_; + /** + * + * + *
+     * Sample rate in Hertz of the audio data sent in all
+     * `RecognitionAudio` messages. This field is optional for `FLAC` and `WAV`
+     * audio files and required for all other audio formats. For details,
+     * see [AudioEncoding][google.cloud.datalabeling.v1beta1.AudioPayload.AudioEncoding].
+     * 
+ * + * int32 sample_rate_hertz = 3; + */ + public int getSampleRateHertz() { + return sampleRateHertz_; + } + /** + * + * + *
+     * Sample rate in Hertz of the audio data sent in all
+     * `RecognitionAudio` messages. This field is optional for `FLAC` and `WAV`
+     * audio files and required for all other audio formats. For details,
+     * see [AudioEncoding][google.cloud.datalabeling.v1beta1.AudioPayload.AudioEncoding].
+     * 
+ * + * int32 sample_rate_hertz = 3; + */ + public Builder setSampleRateHertz(int value) { + + sampleRateHertz_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Sample rate in Hertz of the audio data sent in all
+     * `RecognitionAudio` messages. This field is optional for `FLAC` and `WAV`
+     * audio files and required for all other audio formats. For details,
+     * see [AudioEncoding][google.cloud.datalabeling.v1beta1.AudioPayload.AudioEncoding].
+     * 
+ * + * int32 sample_rate_hertz = 3; + */ + public Builder clearSampleRateHertz() { + + sampleRateHertz_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.AudioPayload) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.AudioPayload) + private static final com.google.cloud.datalabeling.v1beta1.AudioPayload DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.AudioPayload(); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioPayload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AudioPayload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AudioPayload(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AudioPayload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioPayloadOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioPayloadOrBuilder.java new file mode 100644 index 000000000000..a14dac194000 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioPayloadOrBuilder.java @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface AudioPayloadOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.AudioPayload) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Audio uri in user bucket.
+   * 
+ * + * string audio_uri = 1; + */ + java.lang.String getAudioUri(); + /** + * + * + *
+   * Audio uri in user bucket.
+   * 
+ * + * string audio_uri = 1; + */ + com.google.protobuf.ByteString getAudioUriBytes(); + + /** + * + * + *
+   * Sample rate in Hertz of the audio data sent in all
+   * `RecognitionAudio` messages. This field is optional for `FLAC` and `WAV`
+   * audio files and required for all other audio formats. For details,
+   * see [AudioEncoding][google.cloud.datalabeling.v1beta1.AudioPayload.AudioEncoding].
+   * 
+ * + * int32 sample_rate_hertz = 3; + */ + int getSampleRateHertz(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioRecognitionAnnotation.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioRecognitionAnnotation.java new file mode 100644 index 000000000000..713ccbea36fd --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioRecognitionAnnotation.java @@ -0,0 +1,1124 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Speech audio recognition.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation} + */ +public final class AudioRecognitionAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) + AudioRecognitionAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use AudioRecognitionAnnotation.newBuilder() to construct. + private AudioRecognitionAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AudioRecognitionAnnotation() { + transcript_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AudioRecognitionAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + transcript_ = s; + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (startOffset_ != null) { + subBuilder = startOffset_.toBuilder(); + } + startOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startOffset_); + startOffset_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (endOffset_ != null) { + subBuilder = endOffset_.toBuilder(); + } + endOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endOffset_); + endOffset_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AudioRecognitionAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AudioRecognitionAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.class, + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.Builder.class); + } + + public static final int TRANSCRIPT_FIELD_NUMBER = 1; + private volatile java.lang.Object transcript_; + /** + * + * + *
+   * Transcript text representing the words spoken.
+   * 
+ * + * string transcript = 1; + */ + public java.lang.String getTranscript() { + java.lang.Object ref = transcript_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transcript_ = s; + return s; + } + } + /** + * + * + *
+   * Transcript text representing the words spoken.
+   * 
+ * + * string transcript = 1; + */ + public com.google.protobuf.ByteString getTranscriptBytes() { + java.lang.Object ref = transcript_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transcript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int START_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration startOffset_; + /** + * + * + *
+   * Start position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + public boolean hasStartOffset() { + return startOffset_ != null; + } + /** + * + * + *
+   * Start position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + public com.google.protobuf.Duration getStartOffset() { + return startOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : startOffset_; + } + /** + * + * + *
+   * Start position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getStartOffsetOrBuilder() { + return getStartOffset(); + } + + public static final int END_OFFSET_FIELD_NUMBER = 3; + private com.google.protobuf.Duration endOffset_; + /** + * + * + *
+   * End position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + public boolean hasEndOffset() { + return endOffset_ != null; + } + /** + * + * + *
+   * End position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + public com.google.protobuf.Duration getEndOffset() { + return endOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endOffset_; + } + /** + * + * + *
+   * End position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + public com.google.protobuf.DurationOrBuilder getEndOffsetOrBuilder() { + return getEndOffset(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTranscriptBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, transcript_); + } + if (startOffset_ != null) { + output.writeMessage(2, getStartOffset()); + } + if (endOffset_ != null) { + output.writeMessage(3, getEndOffset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTranscriptBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, transcript_); + } + if (startOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStartOffset()); + } + if (endOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndOffset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation other = + (com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) obj; + + if (!getTranscript().equals(other.getTranscript())) return false; + if (hasStartOffset() != other.hasStartOffset()) return false; + if (hasStartOffset()) { + if (!getStartOffset().equals(other.getStartOffset())) return false; + } + if (hasEndOffset() != other.hasEndOffset()) return false; + if (hasEndOffset()) { + if (!getEndOffset().equals(other.getEndOffset())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRANSCRIPT_FIELD_NUMBER; + hash = (53 * hash) + getTranscript().hashCode(); + if (hasStartOffset()) { + hash = (37 * hash) + START_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getStartOffset().hashCode(); + } + if (hasEndOffset()) { + hash = (37 * hash) + END_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getEndOffset().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Speech audio recognition.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AudioRecognitionAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AudioRecognitionAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.class, + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + transcript_ = ""; + + if (startOffsetBuilder_ == null) { + startOffset_ = null; + } else { + startOffset_ = null; + startOffsetBuilder_ = null; + } + if (endOffsetBuilder_ == null) { + endOffset_ = null; + } else { + endOffset_ = null; + endOffsetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_AudioRecognitionAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation build() { + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation buildPartial() { + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation result = + new com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation(this); + result.transcript_ = transcript_; + if (startOffsetBuilder_ == null) { + result.startOffset_ = startOffset_; + } else { + result.startOffset_ = startOffsetBuilder_.build(); + } + if (endOffsetBuilder_ == null) { + result.endOffset_ = endOffset_; + } else { + result.endOffset_ = endOffsetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation other) { + if (other + == com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation.getDefaultInstance()) + return this; + if (!other.getTranscript().isEmpty()) { + transcript_ = other.transcript_; + onChanged(); + } + if (other.hasStartOffset()) { + mergeStartOffset(other.getStartOffset()); + } + if (other.hasEndOffset()) { + mergeEndOffset(other.getEndOffset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object transcript_ = ""; + /** + * + * + *
+     * Transcript text representing the words spoken.
+     * 
+ * + * string transcript = 1; + */ + public java.lang.String getTranscript() { + java.lang.Object ref = transcript_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transcript_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Transcript text representing the words spoken.
+     * 
+ * + * string transcript = 1; + */ + public com.google.protobuf.ByteString getTranscriptBytes() { + java.lang.Object ref = transcript_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transcript_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Transcript text representing the words spoken.
+     * 
+ * + * string transcript = 1; + */ + public Builder setTranscript(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + transcript_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Transcript text representing the words spoken.
+     * 
+ * + * string transcript = 1; + */ + public Builder clearTranscript() { + + transcript_ = getDefaultInstance().getTranscript(); + onChanged(); + return this; + } + /** + * + * + *
+     * Transcript text representing the words spoken.
+     * 
+ * + * string transcript = 1; + */ + public Builder setTranscriptBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + transcript_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Duration startOffset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + startOffsetBuilder_; + /** + * + * + *
+     * Start position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + public boolean hasStartOffset() { + return startOffsetBuilder_ != null || startOffset_ != null; + } + /** + * + * + *
+     * Start position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + public com.google.protobuf.Duration getStartOffset() { + if (startOffsetBuilder_ == null) { + return startOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startOffset_; + } else { + return startOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Start position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + public Builder setStartOffset(com.google.protobuf.Duration value) { + if (startOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startOffset_ = value; + onChanged(); + } else { + startOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Start position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + public Builder setStartOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (startOffsetBuilder_ == null) { + startOffset_ = builderForValue.build(); + onChanged(); + } else { + startOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Start position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + public Builder mergeStartOffset(com.google.protobuf.Duration value) { + if (startOffsetBuilder_ == null) { + if (startOffset_ != null) { + startOffset_ = + com.google.protobuf.Duration.newBuilder(startOffset_).mergeFrom(value).buildPartial(); + } else { + startOffset_ = value; + } + onChanged(); + } else { + startOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Start position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + public Builder clearStartOffset() { + if (startOffsetBuilder_ == null) { + startOffset_ = null; + onChanged(); + } else { + startOffset_ = null; + startOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Start position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + public com.google.protobuf.Duration.Builder getStartOffsetBuilder() { + + onChanged(); + return getStartOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Start position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getStartOffsetOrBuilder() { + if (startOffsetBuilder_ != null) { + return startOffsetBuilder_.getMessageOrBuilder(); + } else { + return startOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startOffset_; + } + } + /** + * + * + *
+     * Start position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getStartOffsetFieldBuilder() { + if (startOffsetBuilder_ == null) { + startOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getStartOffset(), getParentForChildren(), isClean()); + startOffset_ = null; + } + return startOffsetBuilder_; + } + + private com.google.protobuf.Duration endOffset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endOffsetBuilder_; + /** + * + * + *
+     * End position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + public boolean hasEndOffset() { + return endOffsetBuilder_ != null || endOffset_ != null; + } + /** + * + * + *
+     * End position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + public com.google.protobuf.Duration getEndOffset() { + if (endOffsetBuilder_ == null) { + return endOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endOffset_; + } else { + return endOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * End position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + public Builder setEndOffset(com.google.protobuf.Duration value) { + if (endOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endOffset_ = value; + onChanged(); + } else { + endOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * End position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + public Builder setEndOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (endOffsetBuilder_ == null) { + endOffset_ = builderForValue.build(); + onChanged(); + } else { + endOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * End position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + public Builder mergeEndOffset(com.google.protobuf.Duration value) { + if (endOffsetBuilder_ == null) { + if (endOffset_ != null) { + endOffset_ = + com.google.protobuf.Duration.newBuilder(endOffset_).mergeFrom(value).buildPartial(); + } else { + endOffset_ = value; + } + onChanged(); + } else { + endOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * End position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + public Builder clearEndOffset() { + if (endOffsetBuilder_ == null) { + endOffset_ = null; + onChanged(); + } else { + endOffset_ = null; + endOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * End position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + public com.google.protobuf.Duration.Builder getEndOffsetBuilder() { + + onChanged(); + return getEndOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * End position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + public com.google.protobuf.DurationOrBuilder getEndOffsetOrBuilder() { + if (endOffsetBuilder_ != null) { + return endOffsetBuilder_.getMessageOrBuilder(); + } else { + return endOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : endOffset_; + } + } + /** + * + * + *
+     * End position in audio file that the transcription corresponds to.
+     * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getEndOffsetFieldBuilder() { + if (endOffsetBuilder_ == null) { + endOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndOffset(), getParentForChildren(), isClean()); + endOffset_ = null; + } + return endOffsetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) + private static final com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation(); + } + + public static com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AudioRecognitionAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AudioRecognitionAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioRecognitionAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioRecognitionAnnotationOrBuilder.java new file mode 100644 index 000000000000..0424682561b7 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/AudioRecognitionAnnotationOrBuilder.java @@ -0,0 +1,93 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface AudioRecognitionAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.AudioRecognitionAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Transcript text representing the words spoken.
+   * 
+ * + * string transcript = 1; + */ + java.lang.String getTranscript(); + /** + * + * + *
+   * Transcript text representing the words spoken.
+   * 
+ * + * string transcript = 1; + */ + com.google.protobuf.ByteString getTranscriptBytes(); + + /** + * + * + *
+   * Start position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + boolean hasStartOffset(); + /** + * + * + *
+   * Start position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + com.google.protobuf.Duration getStartOffset(); + /** + * + * + *
+   * Start position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration start_offset = 2; + */ + com.google.protobuf.DurationOrBuilder getStartOffsetOrBuilder(); + + /** + * + * + *
+   * End position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + boolean hasEndOffset(); + /** + * + * + *
+   * End position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + com.google.protobuf.Duration getEndOffset(); + /** + * + * + *
+   * End position in audio file that the transcription corresponds to.
+   * 
+ * + * .google.protobuf.Duration end_offset = 3; + */ + com.google.protobuf.DurationOrBuilder getEndOffsetOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPoly.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPoly.java new file mode 100644 index 000000000000..e2673156b4ba --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPoly.java @@ -0,0 +1,925 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * A bounding polygon in the image.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.BoundingPoly} + */ +public final class BoundingPoly extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.BoundingPoly) + BoundingPolyOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoundingPoly.newBuilder() to construct. + private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BoundingPoly() { + vertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BoundingPoly( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + vertices_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.Vertex.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.BoundingPoly.class, + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder.class); + } + + public static final int VERTICES_FIELD_NUMBER = 1; + private java.util.List vertices_; + /** + * + * + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public java.util.List getVerticesList() { + return vertices_; + } + /** + * + * + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesOrBuilderList() { + return vertices_; + } + /** + * + * + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public int getVerticesCount() { + return vertices_.size(); + } + /** + * + * + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Vertex getVertices(int index) { + return vertices_.get(index); + } + /** + * + * + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.VertexOrBuilder getVerticesOrBuilder(int index) { + return vertices_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < vertices_.size(); i++) { + output.writeMessage(1, vertices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < vertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, vertices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.BoundingPoly)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.BoundingPoly other = + (com.google.cloud.datalabeling.v1beta1.BoundingPoly) obj; + + if (!getVerticesList().equals(other.getVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVerticesCount() > 0) { + hash = (37 * hash) + VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getVerticesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.BoundingPoly prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A bounding polygon in the image.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.BoundingPoly} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.BoundingPoly) + com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_BoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.BoundingPoly.class, + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.BoundingPoly.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVerticesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + verticesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_BoundingPoly_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.BoundingPoly getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.BoundingPoly build() { + com.google.cloud.datalabeling.v1beta1.BoundingPoly result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.BoundingPoly buildPartial() { + com.google.cloud.datalabeling.v1beta1.BoundingPoly result = + new com.google.cloud.datalabeling.v1beta1.BoundingPoly(this); + int from_bitField0_ = bitField0_; + if (verticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.vertices_ = vertices_; + } else { + result.vertices_ = verticesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.BoundingPoly) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.BoundingPoly) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.BoundingPoly other) { + if (other == com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance()) + return this; + if (verticesBuilder_ == null) { + if (!other.vertices_.isEmpty()) { + if (vertices_.isEmpty()) { + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVerticesIsMutable(); + vertices_.addAll(other.vertices_); + } + onChanged(); + } + } else { + if (!other.vertices_.isEmpty()) { + if (verticesBuilder_.isEmpty()) { + verticesBuilder_.dispose(); + verticesBuilder_ = null; + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + verticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVerticesFieldBuilder() + : null; + } else { + verticesBuilder_.addAllMessages(other.vertices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.BoundingPoly parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.BoundingPoly) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List vertices_ = + java.util.Collections.emptyList(); + + private void ensureVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + vertices_ = + new java.util.ArrayList(vertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Vertex, + com.google.cloud.datalabeling.v1beta1.Vertex.Builder, + com.google.cloud.datalabeling.v1beta1.VertexOrBuilder> + verticesBuilder_; + + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public java.util.List getVerticesList() { + if (verticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vertices_); + } else { + return verticesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public int getVerticesCount() { + if (verticesBuilder_ == null) { + return vertices_.size(); + } else { + return verticesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Vertex getVertices(int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); + } else { + return verticesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder setVertices(int index, com.google.cloud.datalabeling.v1beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.set(index, value); + onChanged(); + } else { + verticesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.datalabeling.v1beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.set(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder addVertices(com.google.cloud.datalabeling.v1beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(value); + onChanged(); + } else { + verticesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder addVertices(int index, com.google.cloud.datalabeling.v1beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(index, value); + onChanged(); + } else { + verticesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder addVertices( + com.google.cloud.datalabeling.v1beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.datalabeling.v1beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder addAllVertices( + java.lang.Iterable values) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vertices_); + onChanged(); + } else { + verticesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder clearVertices() { + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + verticesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder removeVertices(int index) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.remove(index); + onChanged(); + } else { + verticesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Vertex.Builder getVerticesBuilder(int index) { + return getVerticesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.VertexOrBuilder getVerticesOrBuilder(int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); + } else { + return verticesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesOrBuilderList() { + if (verticesBuilder_ != null) { + return verticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vertices_); + } + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Vertex.Builder addVerticesBuilder() { + return getVerticesFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.Vertex.getDefaultInstance()); + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Vertex.Builder addVerticesBuilder(int index) { + return getVerticesFieldBuilder() + .addBuilder(index, com.google.cloud.datalabeling.v1beta1.Vertex.getDefaultInstance()); + } + /** + * + * + *
+     * The bounding polygon vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesBuilderList() { + return getVerticesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Vertex, + com.google.cloud.datalabeling.v1beta1.Vertex.Builder, + com.google.cloud.datalabeling.v1beta1.VertexOrBuilder> + getVerticesFieldBuilder() { + if (verticesBuilder_ == null) { + verticesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Vertex, + com.google.cloud.datalabeling.v1beta1.Vertex.Builder, + com.google.cloud.datalabeling.v1beta1.VertexOrBuilder>( + vertices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + vertices_ = null; + } + return verticesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.BoundingPoly) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.BoundingPoly) + private static final com.google.cloud.datalabeling.v1beta1.BoundingPoly DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.BoundingPoly(); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPoly getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoundingPoly parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoundingPoly(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.BoundingPoly getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPolyConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPolyConfig.java new file mode 100644 index 000000000000..0a7feb629ceb --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPolyConfig.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Config for image bounding poly (and bounding box) human labeling task.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.BoundingPolyConfig} + */ +public final class BoundingPolyConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.BoundingPolyConfig) + BoundingPolyConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoundingPolyConfig.newBuilder() to construct. + private BoundingPolyConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BoundingPolyConfig() { + annotationSpecSet_ = ""; + instructionMessage_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BoundingPolyConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationSpecSet_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instructionMessage_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_BoundingPolyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_BoundingPolyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.class, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder.class); + } + + public static final int ANNOTATION_SPEC_SET_FIELD_NUMBER = 1; + private volatile java.lang.Object annotationSpecSet_; + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTRUCTION_MESSAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object instructionMessage_; + /** + * + * + *
+   * Optional. Instruction message showed on contributors UI.
+   * 
+ * + * string instruction_message = 2; + */ + public java.lang.String getInstructionMessage() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructionMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Instruction message showed on contributors UI.
+   * 
+ * + * string instruction_message = 2; + */ + public com.google.protobuf.ByteString getInstructionMessageBytes() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructionMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAnnotationSpecSetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecSet_); + } + if (!getInstructionMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instructionMessage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAnnotationSpecSetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotationSpecSet_); + } + if (!getInstructionMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instructionMessage_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig other = + (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) obj; + + if (!getAnnotationSpecSet().equals(other.getAnnotationSpecSet())) return false; + if (!getInstructionMessage().equals(other.getInstructionMessage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANNOTATION_SPEC_SET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSet().hashCode(); + hash = (37 * hash) + INSTRUCTION_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getInstructionMessage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for image bounding poly (and bounding box) human labeling task.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.BoundingPolyConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.BoundingPolyConfig) + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_BoundingPolyConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_BoundingPolyConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.class, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + annotationSpecSet_ = ""; + + instructionMessage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_BoundingPolyConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig build() { + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig result = + new com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig(this); + result.annotationSpecSet_ = annotationSpecSet_; + result.instructionMessage_ = instructionMessage_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig other) { + if (other == com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance()) + return this; + if (!other.getAnnotationSpecSet().isEmpty()) { + annotationSpecSet_ = other.annotationSpecSet_; + onChanged(); + } + if (!other.getInstructionMessage().isEmpty()) { + instructionMessage_ = other.instructionMessage_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object annotationSpecSet_ = ""; + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSpecSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder clearAnnotationSpecSet() { + + annotationSpecSet_ = getDefaultInstance().getAnnotationSpecSet(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationSpecSet_ = value; + onChanged(); + return this; + } + + private java.lang.Object instructionMessage_ = ""; + /** + * + * + *
+     * Optional. Instruction message showed on contributors UI.
+     * 
+ * + * string instruction_message = 2; + */ + public java.lang.String getInstructionMessage() { + java.lang.Object ref = instructionMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructionMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Instruction message showed on contributors UI.
+     * 
+ * + * string instruction_message = 2; + */ + public com.google.protobuf.ByteString getInstructionMessageBytes() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructionMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Instruction message showed on contributors UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder setInstructionMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instructionMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Instruction message showed on contributors UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder clearInstructionMessage() { + + instructionMessage_ = getDefaultInstance().getInstructionMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Instruction message showed on contributors UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder setInstructionMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instructionMessage_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.BoundingPolyConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.BoundingPolyConfig) + private static final com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoundingPolyConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoundingPolyConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPolyConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPolyConfigOrBuilder.java new file mode 100644 index 000000000000..74c422fb88b8 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPolyConfigOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface BoundingPolyConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.BoundingPolyConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + java.lang.String getAnnotationSpecSet(); + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + com.google.protobuf.ByteString getAnnotationSpecSetBytes(); + + /** + * + * + *
+   * Optional. Instruction message showed on contributors UI.
+   * 
+ * + * string instruction_message = 2; + */ + java.lang.String getInstructionMessage(); + /** + * + * + *
+   * Optional. Instruction message showed on contributors UI.
+   * 
+ * + * string instruction_message = 2; + */ + com.google.protobuf.ByteString getInstructionMessageBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPolyOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPolyOrBuilder.java new file mode 100644 index 000000000000..bafef4968b4c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/BoundingPolyOrBuilder.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface BoundingPolyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.BoundingPoly) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + java.util.List getVerticesList(); + /** + * + * + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + com.google.cloud.datalabeling.v1beta1.Vertex getVertices(int index); + /** + * + * + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + int getVerticesCount(); + /** + * + * + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + java.util.List + getVerticesOrBuilderList(); + /** + * + * + *
+   * The bounding polygon vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + com.google.cloud.datalabeling.v1beta1.VertexOrBuilder getVerticesOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateAnnotationSpecSetRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateAnnotationSpecSetRequest.java new file mode 100644 index 000000000000..50a22dc7c21c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateAnnotationSpecSetRequest.java @@ -0,0 +1,915 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for CreateAnnotationSpecSet.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest} + */ +public final class CreateAnnotationSpecSetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest) + CreateAnnotationSpecSetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAnnotationSpecSetRequest.newBuilder() to construct. + private CreateAnnotationSpecSetRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAnnotationSpecSetRequest() { + parent_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateAnnotationSpecSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder subBuilder = null; + if (annotationSpecSet_ != null) { + subBuilder = annotationSpecSet_.toBuilder(); + } + annotationSpecSet_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationSpecSet_); + annotationSpecSet_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateAnnotationSpecSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateAnnotationSpecSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest.class, + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. AnnotationSpecSet resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. AnnotationSpecSet resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATION_SPEC_SET_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotationSpecSet_; + /** + * + * + *
+   * Required. Annotation spec set to create. Annotation specs must be included.
+   * Only one annotation spec will be accepted for annotation specs with same
+   * display_name.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + public boolean hasAnnotationSpecSet() { + return annotationSpecSet_ != null; + } + /** + * + * + *
+   * Required. Annotation spec set to create. Annotation specs must be included.
+   * Only one annotation spec will be accepted for annotation specs with same
+   * display_name.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet getAnnotationSpecSet() { + return annotationSpecSet_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.getDefaultInstance() + : annotationSpecSet_; + } + /** + * + * + *
+   * Required. Annotation spec set to create. Annotation specs must be included.
+   * Only one annotation spec will be accepted for annotation specs with same
+   * display_name.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder + getAnnotationSpecSetOrBuilder() { + return getAnnotationSpecSet(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (annotationSpecSet_ != null) { + output.writeMessage(2, getAnnotationSpecSet()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (annotationSpecSet_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAnnotationSpecSet()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest other = + (com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasAnnotationSpecSet() != other.hasAnnotationSpecSet()) return false; + if (hasAnnotationSpecSet()) { + if (!getAnnotationSpecSet().equals(other.getAnnotationSpecSet())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasAnnotationSpecSet()) { + hash = (37 * hash) + ANNOTATION_SPEC_SET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSet().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CreateAnnotationSpecSet.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest) + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateAnnotationSpecSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateAnnotationSpecSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest.class, + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (annotationSpecSetBuilder_ == null) { + annotationSpecSet_ = null; + } else { + annotationSpecSet_ = null; + annotationSpecSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateAnnotationSpecSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest build() { + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest result = + new com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest(this); + result.parent_ = parent_; + if (annotationSpecSetBuilder_ == null) { + result.annotationSpecSet_ = annotationSpecSet_; + } else { + result.annotationSpecSet_ = annotationSpecSetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest other) { + if (other + == com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasAnnotationSpecSet()) { + mergeAnnotationSpecSet(other.getAnnotationSpecSet()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. AnnotationSpecSet resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. AnnotationSpecSet resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. AnnotationSpecSet resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. AnnotationSpecSet resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. AnnotationSpecSet resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotationSpecSet_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder> + annotationSpecSetBuilder_; + /** + * + * + *
+     * Required. Annotation spec set to create. Annotation specs must be included.
+     * Only one annotation spec will be accepted for annotation specs with same
+     * display_name.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + public boolean hasAnnotationSpecSet() { + return annotationSpecSetBuilder_ != null || annotationSpecSet_ != null; + } + /** + * + * + *
+     * Required. Annotation spec set to create. Annotation specs must be included.
+     * Only one annotation spec will be accepted for annotation specs with same
+     * display_name.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet getAnnotationSpecSet() { + if (annotationSpecSetBuilder_ == null) { + return annotationSpecSet_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.getDefaultInstance() + : annotationSpecSet_; + } else { + return annotationSpecSetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Annotation spec set to create. Annotation specs must be included.
+     * Only one annotation spec will be accepted for annotation specs with same
+     * display_name.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + public Builder setAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet value) { + if (annotationSpecSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationSpecSet_ = value; + onChanged(); + } else { + annotationSpecSetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Annotation spec set to create. Annotation specs must be included.
+     * Only one annotation spec will be accepted for annotation specs with same
+     * display_name.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + public Builder setAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder builderForValue) { + if (annotationSpecSetBuilder_ == null) { + annotationSpecSet_ = builderForValue.build(); + onChanged(); + } else { + annotationSpecSetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Annotation spec set to create. Annotation specs must be included.
+     * Only one annotation spec will be accepted for annotation specs with same
+     * display_name.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + public Builder mergeAnnotationSpecSet( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet value) { + if (annotationSpecSetBuilder_ == null) { + if (annotationSpecSet_ != null) { + annotationSpecSet_ = + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.newBuilder(annotationSpecSet_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationSpecSet_ = value; + } + onChanged(); + } else { + annotationSpecSetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Annotation spec set to create. Annotation specs must be included.
+     * Only one annotation spec will be accepted for annotation specs with same
+     * display_name.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + public Builder clearAnnotationSpecSet() { + if (annotationSpecSetBuilder_ == null) { + annotationSpecSet_ = null; + onChanged(); + } else { + annotationSpecSet_ = null; + annotationSpecSetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Annotation spec set to create. Annotation specs must be included.
+     * Only one annotation spec will be accepted for annotation specs with same
+     * display_name.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder + getAnnotationSpecSetBuilder() { + + onChanged(); + return getAnnotationSpecSetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Annotation spec set to create. Annotation specs must be included.
+     * Only one annotation spec will be accepted for annotation specs with same
+     * display_name.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder + getAnnotationSpecSetOrBuilder() { + if (annotationSpecSetBuilder_ != null) { + return annotationSpecSetBuilder_.getMessageOrBuilder(); + } else { + return annotationSpecSet_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.getDefaultInstance() + : annotationSpecSet_; + } + } + /** + * + * + *
+     * Required. Annotation spec set to create. Annotation specs must be included.
+     * Only one annotation spec will be accepted for annotation specs with same
+     * display_name.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder> + getAnnotationSpecSetFieldBuilder() { + if (annotationSpecSetBuilder_ == null) { + annotationSpecSetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder>( + getAnnotationSpecSet(), getParentForChildren(), isClean()); + annotationSpecSet_ = null; + } + return annotationSpecSetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest) + private static final com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAnnotationSpecSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateAnnotationSpecSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateAnnotationSpecSetRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateAnnotationSpecSetRequestOrBuilder.java new file mode 100644 index 000000000000..4a5c6b0b51fe --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateAnnotationSpecSetRequestOrBuilder.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface CreateAnnotationSpecSetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. AnnotationSpecSet resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. AnnotationSpecSet resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Annotation spec set to create. Annotation specs must be included.
+   * Only one annotation spec will be accepted for annotation specs with same
+   * display_name.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + boolean hasAnnotationSpecSet(); + /** + * + * + *
+   * Required. Annotation spec set to create. Annotation specs must be included.
+   * Only one annotation spec will be accepted for annotation specs with same
+   * display_name.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet getAnnotationSpecSet(); + /** + * + * + *
+   * Required. Annotation spec set to create. Annotation specs must be included.
+   * Only one annotation spec will be accepted for annotation specs with same
+   * display_name.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_set = 2; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder getAnnotationSpecSetOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateDatasetRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateDatasetRequest.java new file mode 100644 index 000000000000..1d5daf946d8d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateDatasetRequest.java @@ -0,0 +1,873 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for CreateDataset.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.CreateDatasetRequest} + */ +public final class CreateDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.CreateDatasetRequest) + CreateDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDatasetRequest.newBuilder() to construct. + private CreateDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDatasetRequest() { + parent_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.Dataset.Builder subBuilder = null; + if (dataset_ != null) { + subBuilder = dataset_.toBuilder(); + } + dataset_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.Dataset.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dataset_); + dataset_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest.class, + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Dataset resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Dataset resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATASET_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.Dataset dataset_; + /** + * + * + *
+   * Required. The dataset to be created.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + public boolean hasDataset() { + return dataset_ != null; + } + /** + * + * + *
+   * Required. The dataset to be created.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + public com.google.cloud.datalabeling.v1beta1.Dataset getDataset() { + return dataset_ == null + ? com.google.cloud.datalabeling.v1beta1.Dataset.getDefaultInstance() + : dataset_; + } + /** + * + * + *
+   * Required. The dataset to be created.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + public com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder getDatasetOrBuilder() { + return getDataset(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (dataset_ != null) { + output.writeMessage(2, getDataset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (dataset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest other = + (com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasDataset() != other.hasDataset()) return false; + if (hasDataset()) { + if (!getDataset().equals(other.getDataset())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasDataset()) { + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CreateDataset.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.CreateDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.CreateDatasetRequest) + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest.class, + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (datasetBuilder_ == null) { + dataset_ = null; + } else { + dataset_ = null; + datasetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest build() { + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest result = + new com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest(this); + result.parent_ = parent_; + if (datasetBuilder_ == null) { + result.dataset_ = dataset_; + } else { + result.dataset_ = datasetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasDataset()) { + mergeDataset(other.getDataset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Dataset resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.Dataset dataset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Dataset, + com.google.cloud.datalabeling.v1beta1.Dataset.Builder, + com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder> + datasetBuilder_; + /** + * + * + *
+     * Required. The dataset to be created.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + public boolean hasDataset() { + return datasetBuilder_ != null || dataset_ != null; + } + /** + * + * + *
+     * Required. The dataset to be created.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + public com.google.cloud.datalabeling.v1beta1.Dataset getDataset() { + if (datasetBuilder_ == null) { + return dataset_ == null + ? com.google.cloud.datalabeling.v1beta1.Dataset.getDefaultInstance() + : dataset_; + } else { + return datasetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The dataset to be created.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + public Builder setDataset(com.google.cloud.datalabeling.v1beta1.Dataset value) { + if (datasetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataset_ = value; + onChanged(); + } else { + datasetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The dataset to be created.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + public Builder setDataset( + com.google.cloud.datalabeling.v1beta1.Dataset.Builder builderForValue) { + if (datasetBuilder_ == null) { + dataset_ = builderForValue.build(); + onChanged(); + } else { + datasetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The dataset to be created.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + public Builder mergeDataset(com.google.cloud.datalabeling.v1beta1.Dataset value) { + if (datasetBuilder_ == null) { + if (dataset_ != null) { + dataset_ = + com.google.cloud.datalabeling.v1beta1.Dataset.newBuilder(dataset_) + .mergeFrom(value) + .buildPartial(); + } else { + dataset_ = value; + } + onChanged(); + } else { + datasetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The dataset to be created.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + public Builder clearDataset() { + if (datasetBuilder_ == null) { + dataset_ = null; + onChanged(); + } else { + dataset_ = null; + datasetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The dataset to be created.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + public com.google.cloud.datalabeling.v1beta1.Dataset.Builder getDatasetBuilder() { + + onChanged(); + return getDatasetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The dataset to be created.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + public com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder getDatasetOrBuilder() { + if (datasetBuilder_ != null) { + return datasetBuilder_.getMessageOrBuilder(); + } else { + return dataset_ == null + ? com.google.cloud.datalabeling.v1beta1.Dataset.getDefaultInstance() + : dataset_; + } + } + /** + * + * + *
+     * Required. The dataset to be created.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Dataset, + com.google.cloud.datalabeling.v1beta1.Dataset.Builder, + com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder> + getDatasetFieldBuilder() { + if (datasetBuilder_ == null) { + datasetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Dataset, + com.google.cloud.datalabeling.v1beta1.Dataset.Builder, + com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder>( + getDataset(), getParentForChildren(), isClean()); + dataset_ = null; + } + return datasetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.CreateDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.CreateDatasetRequest) + private static final com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateDatasetRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateDatasetRequestOrBuilder.java new file mode 100644 index 000000000000..ed2413534848 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateDatasetRequestOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface CreateDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.CreateDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Dataset resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Dataset resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The dataset to be created.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + boolean hasDataset(); + /** + * + * + *
+   * Required. The dataset to be created.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + com.google.cloud.datalabeling.v1beta1.Dataset getDataset(); + /** + * + * + *
+   * Required. The dataset to be created.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Dataset dataset = 2; + */ + com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder getDatasetOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionMetadata.java new file mode 100644 index 000000000000..9bc0000c2edf --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionMetadata.java @@ -0,0 +1,1143 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Metadata of a CreateInstruction operation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.CreateInstructionMetadata} + */ +public final class CreateInstructionMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.CreateInstructionMetadata) + CreateInstructionMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateInstructionMetadata.newBuilder() to construct. + private CreateInstructionMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateInstructionMetadata() { + instruction_ = ""; + partialFailures_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateInstructionMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + instruction_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + partialFailures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + partialFailures_.add( + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata.class, + com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata.Builder.class); + } + + private int bitField0_; + public static final int INSTRUCTION_FIELD_NUMBER = 1; + private volatile java.lang.Object instruction_; + /** + * + * + *
+   * Output only. The name of the created Instruction.
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string instruction = 1; + */ + public java.lang.String getInstruction() { + java.lang.Object ref = instruction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instruction_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of the created Instruction.
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string instruction = 1; + */ + public com.google.protobuf.ByteString getInstructionBytes() { + java.lang.Object ref = instruction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTIAL_FAILURES_FIELD_NUMBER = 2; + private java.util.List partialFailures_; + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List + getPartialFailuresOrBuilderList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public int getPartialFailuresCount() { + return partialFailures_.size(); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status getPartialFailures(int index) { + return partialFailures_.get(index); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + return partialFailures_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getInstructionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instruction_); + } + for (int i = 0; i < partialFailures_.size(); i++) { + output.writeMessage(2, partialFailures_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getInstructionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instruction_); + } + for (int i = 0; i < partialFailures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, partialFailures_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata other = + (com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata) obj; + + if (!getInstruction().equals(other.getInstruction())) return false; + if (!getPartialFailuresList().equals(other.getPartialFailuresList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getInstruction().hashCode(); + if (getPartialFailuresCount() > 0) { + hash = (37 * hash) + PARTIAL_FAILURES_FIELD_NUMBER; + hash = (53 * hash) + getPartialFailuresList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata of a CreateInstruction operation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.CreateInstructionMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.CreateInstructionMetadata) + com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata.class, + com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPartialFailuresFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + instruction_ = ""; + + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + partialFailuresBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata build() { + com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata buildPartial() { + com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata result = + new com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.instruction_ = instruction_; + if (partialFailuresBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.partialFailures_ = partialFailures_; + } else { + result.partialFailures_ = partialFailuresBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata.getDefaultInstance()) + return this; + if (!other.getInstruction().isEmpty()) { + instruction_ = other.instruction_; + onChanged(); + } + if (partialFailuresBuilder_ == null) { + if (!other.partialFailures_.isEmpty()) { + if (partialFailures_.isEmpty()) { + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePartialFailuresIsMutable(); + partialFailures_.addAll(other.partialFailures_); + } + onChanged(); + } + } else { + if (!other.partialFailures_.isEmpty()) { + if (partialFailuresBuilder_.isEmpty()) { + partialFailuresBuilder_.dispose(); + partialFailuresBuilder_ = null; + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000002); + partialFailuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPartialFailuresFieldBuilder() + : null; + } else { + partialFailuresBuilder_.addAllMessages(other.partialFailures_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object instruction_ = ""; + /** + * + * + *
+     * Output only. The name of the created Instruction.
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string instruction = 1; + */ + public java.lang.String getInstruction() { + java.lang.Object ref = instruction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instruction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of the created Instruction.
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string instruction = 1; + */ + public com.google.protobuf.ByteString getInstructionBytes() { + java.lang.Object ref = instruction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of the created Instruction.
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string instruction = 1; + */ + public Builder setInstruction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instruction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the created Instruction.
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string instruction = 1; + */ + public Builder clearInstruction() { + + instruction_ = getDefaultInstance().getInstruction(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of the created Instruction.
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string instruction = 1; + */ + public Builder setInstructionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instruction_ = value; + onChanged(); + return this; + } + + private java.util.List partialFailures_ = + java.util.Collections.emptyList(); + + private void ensurePartialFailuresIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + partialFailures_ = new java.util.ArrayList(partialFailures_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + partialFailuresBuilder_; + + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresList() { + if (partialFailuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialFailures_); + } else { + return partialFailuresBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public int getPartialFailuresCount() { + if (partialFailuresBuilder_ == null) { + return partialFailures_.size(); + } else { + return partialFailuresBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status getPartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder setPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, value); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder setPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addAllPartialFailures( + java.lang.Iterable values) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialFailures_); + onChanged(); + } else { + partialFailuresBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder clearPartialFailures() { + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + partialFailuresBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder removePartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.remove(index); + onChanged(); + } else { + partialFailuresBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder getPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List + getPartialFailuresOrBuilderList() { + if (partialFailuresBuilder_ != null) { + return partialFailuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialFailures_); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder() { + return getPartialFailuresFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresBuilderList() { + return getPartialFailuresFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getPartialFailuresFieldBuilder() { + if (partialFailuresBuilder_ == null) { + partialFailuresBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + partialFailures_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + partialFailures_ = null; + } + return partialFailuresBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.CreateInstructionMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.CreateInstructionMetadata) + private static final com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInstructionMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateInstructionMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionMetadataOrBuilder.java new file mode 100644 index 000000000000..398a593cda14 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionMetadataOrBuilder.java @@ -0,0 +1,94 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface CreateInstructionMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.CreateInstructionMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of the created Instruction.
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string instruction = 1; + */ + java.lang.String getInstruction(); + /** + * + * + *
+   * Output only. The name of the created Instruction.
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string instruction = 1; + */ + com.google.protobuf.ByteString getInstructionBytes(); + + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + java.util.List getPartialFailuresList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + com.google.rpc.Status getPartialFailures(int index); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + int getPartialFailuresCount(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + java.util.List getPartialFailuresOrBuilderList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionRequest.java new file mode 100644 index 000000000000..3a4e84f33b96 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionRequest.java @@ -0,0 +1,880 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for CreateInstruction.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.CreateInstructionRequest} + */ +public final class CreateInstructionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.CreateInstructionRequest) + CreateInstructionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateInstructionRequest.newBuilder() to construct. + private CreateInstructionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateInstructionRequest() { + parent_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateInstructionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.Instruction.Builder subBuilder = null; + if (instruction_ != null) { + subBuilder = instruction_.toBuilder(); + } + instruction_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.Instruction.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instruction_); + instruction_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest.class, + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Instruction resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Instruction resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTRUCTION_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.Instruction instruction_; + /** + * + * + *
+   * Required. Instruction of how to perform the labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + public boolean hasInstruction() { + return instruction_ != null; + } + /** + * + * + *
+   * Required. Instruction of how to perform the labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + public com.google.cloud.datalabeling.v1beta1.Instruction getInstruction() { + return instruction_ == null + ? com.google.cloud.datalabeling.v1beta1.Instruction.getDefaultInstance() + : instruction_; + } + /** + * + * + *
+   * Required. Instruction of how to perform the labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + public com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder getInstructionOrBuilder() { + return getInstruction(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (instruction_ != null) { + output.writeMessage(2, getInstruction()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (instruction_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInstruction()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest other = + (com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasInstruction() != other.hasInstruction()) return false; + if (hasInstruction()) { + if (!getInstruction().equals(other.getInstruction())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasInstruction()) { + hash = (37 * hash) + INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getInstruction().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CreateInstruction.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.CreateInstructionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.CreateInstructionRequest) + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest.class, + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (instructionBuilder_ == null) { + instruction_ = null; + } else { + instruction_ = null; + instructionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest build() { + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest result = + new com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest(this); + result.parent_ = parent_; + if (instructionBuilder_ == null) { + result.instruction_ = instruction_; + } else { + result.instruction_ = instructionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest other) { + if (other + == com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasInstruction()) { + mergeInstruction(other.getInstruction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Instruction resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Instruction resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Instruction resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instruction resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instruction resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.Instruction instruction_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Instruction, + com.google.cloud.datalabeling.v1beta1.Instruction.Builder, + com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder> + instructionBuilder_; + /** + * + * + *
+     * Required. Instruction of how to perform the labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + public boolean hasInstruction() { + return instructionBuilder_ != null || instruction_ != null; + } + /** + * + * + *
+     * Required. Instruction of how to perform the labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + public com.google.cloud.datalabeling.v1beta1.Instruction getInstruction() { + if (instructionBuilder_ == null) { + return instruction_ == null + ? com.google.cloud.datalabeling.v1beta1.Instruction.getDefaultInstance() + : instruction_; + } else { + return instructionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Instruction of how to perform the labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + public Builder setInstruction(com.google.cloud.datalabeling.v1beta1.Instruction value) { + if (instructionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instruction_ = value; + onChanged(); + } else { + instructionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Instruction of how to perform the labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + public Builder setInstruction( + com.google.cloud.datalabeling.v1beta1.Instruction.Builder builderForValue) { + if (instructionBuilder_ == null) { + instruction_ = builderForValue.build(); + onChanged(); + } else { + instructionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Instruction of how to perform the labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + public Builder mergeInstruction(com.google.cloud.datalabeling.v1beta1.Instruction value) { + if (instructionBuilder_ == null) { + if (instruction_ != null) { + instruction_ = + com.google.cloud.datalabeling.v1beta1.Instruction.newBuilder(instruction_) + .mergeFrom(value) + .buildPartial(); + } else { + instruction_ = value; + } + onChanged(); + } else { + instructionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Instruction of how to perform the labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + public Builder clearInstruction() { + if (instructionBuilder_ == null) { + instruction_ = null; + onChanged(); + } else { + instruction_ = null; + instructionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Instruction of how to perform the labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + public com.google.cloud.datalabeling.v1beta1.Instruction.Builder getInstructionBuilder() { + + onChanged(); + return getInstructionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Instruction of how to perform the labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + public com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder getInstructionOrBuilder() { + if (instructionBuilder_ != null) { + return instructionBuilder_.getMessageOrBuilder(); + } else { + return instruction_ == null + ? com.google.cloud.datalabeling.v1beta1.Instruction.getDefaultInstance() + : instruction_; + } + } + /** + * + * + *
+     * Required. Instruction of how to perform the labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Instruction, + com.google.cloud.datalabeling.v1beta1.Instruction.Builder, + com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder> + getInstructionFieldBuilder() { + if (instructionBuilder_ == null) { + instructionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Instruction, + com.google.cloud.datalabeling.v1beta1.Instruction.Builder, + com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder>( + getInstruction(), getParentForChildren(), isClean()); + instruction_ = null; + } + return instructionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.CreateInstructionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.CreateInstructionRequest) + private static final com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateInstructionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateInstructionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionRequestOrBuilder.java new file mode 100644 index 000000000000..79679d12ca2b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CreateInstructionRequestOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface CreateInstructionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.CreateInstructionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Instruction resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Instruction resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Instruction of how to perform the labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + boolean hasInstruction(); + /** + * + * + *
+   * Required. Instruction of how to perform the labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + com.google.cloud.datalabeling.v1beta1.Instruction getInstruction(); + /** + * + * + *
+   * Required. Instruction of how to perform the labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.Instruction instruction = 2; + */ + com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder getInstructionOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CsvInstruction.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CsvInstruction.java new file mode 100644 index 000000000000..5d6013619561 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CsvInstruction.java @@ -0,0 +1,598 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/instruction.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Instruction from a CSV file.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.CsvInstruction} + */ +public final class CsvInstruction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.CsvInstruction) + CsvInstructionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CsvInstruction.newBuilder() to construct. + private CsvInstruction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CsvInstruction() { + gcsFileUri_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CsvInstruction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + gcsFileUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CsvInstruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CsvInstruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.CsvInstruction.class, + com.google.cloud.datalabeling.v1beta1.CsvInstruction.Builder.class); + } + + public static final int GCS_FILE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object gcsFileUri_; + /** + * + * + *
+   * CSV file for the instruction. Only gcs path is allowed.
+   * 
+ * + * string gcs_file_uri = 1; + */ + public java.lang.String getGcsFileUri() { + java.lang.Object ref = gcsFileUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsFileUri_ = s; + return s; + } + } + /** + * + * + *
+   * CSV file for the instruction. Only gcs path is allowed.
+   * 
+ * + * string gcs_file_uri = 1; + */ + public com.google.protobuf.ByteString getGcsFileUriBytes() { + java.lang.Object ref = gcsFileUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsFileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getGcsFileUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsFileUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGcsFileUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsFileUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.CsvInstruction)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.CsvInstruction other = + (com.google.cloud.datalabeling.v1beta1.CsvInstruction) obj; + + if (!getGcsFileUri().equals(other.getGcsFileUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GCS_FILE_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsFileUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.CsvInstruction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Instruction from a CSV file.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.CsvInstruction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.CsvInstruction) + com.google.cloud.datalabeling.v1beta1.CsvInstructionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CsvInstruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CsvInstruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.CsvInstruction.class, + com.google.cloud.datalabeling.v1beta1.CsvInstruction.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.CsvInstruction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + gcsFileUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_CsvInstruction_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CsvInstruction getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.CsvInstruction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CsvInstruction build() { + com.google.cloud.datalabeling.v1beta1.CsvInstruction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CsvInstruction buildPartial() { + com.google.cloud.datalabeling.v1beta1.CsvInstruction result = + new com.google.cloud.datalabeling.v1beta1.CsvInstruction(this); + result.gcsFileUri_ = gcsFileUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.CsvInstruction) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.CsvInstruction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.CsvInstruction other) { + if (other == com.google.cloud.datalabeling.v1beta1.CsvInstruction.getDefaultInstance()) + return this; + if (!other.getGcsFileUri().isEmpty()) { + gcsFileUri_ = other.gcsFileUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.CsvInstruction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.CsvInstruction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object gcsFileUri_ = ""; + /** + * + * + *
+     * CSV file for the instruction. Only gcs path is allowed.
+     * 
+ * + * string gcs_file_uri = 1; + */ + public java.lang.String getGcsFileUri() { + java.lang.Object ref = gcsFileUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsFileUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * CSV file for the instruction. Only gcs path is allowed.
+     * 
+ * + * string gcs_file_uri = 1; + */ + public com.google.protobuf.ByteString getGcsFileUriBytes() { + java.lang.Object ref = gcsFileUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsFileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * CSV file for the instruction. Only gcs path is allowed.
+     * 
+ * + * string gcs_file_uri = 1; + */ + public Builder setGcsFileUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsFileUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * CSV file for the instruction. Only gcs path is allowed.
+     * 
+ * + * string gcs_file_uri = 1; + */ + public Builder clearGcsFileUri() { + + gcsFileUri_ = getDefaultInstance().getGcsFileUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * CSV file for the instruction. Only gcs path is allowed.
+     * 
+ * + * string gcs_file_uri = 1; + */ + public Builder setGcsFileUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsFileUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.CsvInstruction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.CsvInstruction) + private static final com.google.cloud.datalabeling.v1beta1.CsvInstruction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.CsvInstruction(); + } + + public static com.google.cloud.datalabeling.v1beta1.CsvInstruction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CsvInstruction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CsvInstruction(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.CsvInstruction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CsvInstructionOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CsvInstructionOrBuilder.java new file mode 100644 index 000000000000..e467e552a2ef --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/CsvInstructionOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/instruction.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface CsvInstructionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.CsvInstruction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * CSV file for the instruction. Only gcs path is allowed.
+   * 
+ * + * string gcs_file_uri = 1; + */ + java.lang.String getGcsFileUri(); + /** + * + * + *
+   * CSV file for the instruction. Only gcs path is allowed.
+   * 
+ * + * string gcs_file_uri = 1; + */ + com.google.protobuf.ByteString getGcsFileUriBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataItem.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataItem.java new file mode 100644 index 000000000000..b0acc25b7c5f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataItem.java @@ -0,0 +1,1848 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * DataItem is a piece of data, without annotation. For example, an image.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.DataItem} + */ +public final class DataItem extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.DataItem) + DataItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataItem.newBuilder() to construct. + private DataItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataItem() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DataItem( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder subBuilder = null; + if (payloadCase_ == 2) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_).toBuilder(); + } + payload_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ImagePayload.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_); + payload_ = subBuilder.buildPartial(); + } + payloadCase_ = 2; + break; + } + case 26: + { + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder subBuilder = null; + if (payloadCase_ == 3) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.TextPayload) payload_).toBuilder(); + } + payload_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.TextPayload.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datalabeling.v1beta1.TextPayload) payload_); + payload_ = subBuilder.buildPartial(); + } + payloadCase_ = 3; + break; + } + case 34: + { + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder subBuilder = null; + if (payloadCase_ == 4) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_).toBuilder(); + } + payload_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.VideoPayload.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_); + payload_ = subBuilder.buildPartial(); + } + payloadCase_ = 4; + break; + } + case 42: + { + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder subBuilder = null; + if (payloadCase_ == 5) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_).toBuilder(); + } + payload_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AudioPayload.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_); + payload_ = subBuilder.buildPartial(); + } + payloadCase_ = 5; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DataItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DataItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.DataItem.class, + com.google.cloud.datalabeling.v1beta1.DataItem.Builder.class); + } + + private int payloadCase_ = 0; + private java.lang.Object payload_; + + public enum PayloadCase implements com.google.protobuf.Internal.EnumLite { + IMAGE_PAYLOAD(2), + TEXT_PAYLOAD(3), + VIDEO_PAYLOAD(4), + AUDIO_PAYLOAD(5), + PAYLOAD_NOT_SET(0); + private final int value; + + private PayloadCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 2: + return IMAGE_PAYLOAD; + case 3: + return TEXT_PAYLOAD; + case 4: + return VIDEO_PAYLOAD; + case 5: + return AUDIO_PAYLOAD; + case 0: + return PAYLOAD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public static final int IMAGE_PAYLOAD_FIELD_NUMBER = 2; + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public boolean hasImagePayload() { + return payloadCase_ == 2; + } + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public com.google.cloud.datalabeling.v1beta1.ImagePayload getImagePayload() { + if (payloadCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder getImagePayloadOrBuilder() { + if (payloadCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } + + public static final int TEXT_PAYLOAD_FIELD_NUMBER = 3; + /** + * + * + *
+   * The text payload, a container of text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + public boolean hasTextPayload() { + return payloadCase_ == 3; + } + /** + * + * + *
+   * The text payload, a container of text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + public com.google.cloud.datalabeling.v1beta1.TextPayload getTextPayload() { + if (payloadCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } + /** + * + * + *
+   * The text payload, a container of text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + public com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder getTextPayloadOrBuilder() { + if (payloadCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } + + public static final int VIDEO_PAYLOAD_FIELD_NUMBER = 4; + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + public boolean hasVideoPayload() { + return payloadCase_ == 4; + } + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + public com.google.cloud.datalabeling.v1beta1.VideoPayload getVideoPayload() { + if (payloadCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + public com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder getVideoPayloadOrBuilder() { + if (payloadCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } + + public static final int AUDIO_PAYLOAD_FIELD_NUMBER = 5; + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + public boolean hasAudioPayload() { + return payloadCase_ == 5; + } + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + public com.google.cloud.datalabeling.v1beta1.AudioPayload getAudioPayload() { + if (payloadCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + public com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder getAudioPayloadOrBuilder() { + if (payloadCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Name of the data item, in format of:
+   * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the data item, in format of:
+   * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (payloadCase_ == 2) { + output.writeMessage(2, (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_); + } + if (payloadCase_ == 3) { + output.writeMessage(3, (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_); + } + if (payloadCase_ == 4) { + output.writeMessage(4, (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_); + } + if (payloadCase_ == 5) { + output.writeMessage(5, (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (payloadCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_); + } + if (payloadCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_); + } + if (payloadCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_); + } + if (payloadCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.DataItem)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.DataItem other = + (com.google.cloud.datalabeling.v1beta1.DataItem) obj; + + if (!getName().equals(other.getName())) return false; + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 2: + if (!getImagePayload().equals(other.getImagePayload())) return false; + break; + case 3: + if (!getTextPayload().equals(other.getTextPayload())) return false; + break; + case 4: + if (!getVideoPayload().equals(other.getVideoPayload())) return false; + break; + case 5: + if (!getAudioPayload().equals(other.getAudioPayload())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + switch (payloadCase_) { + case 2: + hash = (37 * hash) + IMAGE_PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getImagePayload().hashCode(); + break; + case 3: + hash = (37 * hash) + TEXT_PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getTextPayload().hashCode(); + break; + case 4: + hash = (37 * hash) + VIDEO_PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getVideoPayload().hashCode(); + break; + case 5: + hash = (37 * hash) + AUDIO_PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getAudioPayload().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.DataItem prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * DataItem is a piece of data, without annotation. For example, an image.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.DataItem} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.DataItem) + com.google.cloud.datalabeling.v1beta1.DataItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DataItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DataItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.DataItem.class, + com.google.cloud.datalabeling.v1beta1.DataItem.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.DataItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DataItem_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DataItem getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.DataItem.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DataItem build() { + com.google.cloud.datalabeling.v1beta1.DataItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DataItem buildPartial() { + com.google.cloud.datalabeling.v1beta1.DataItem result = + new com.google.cloud.datalabeling.v1beta1.DataItem(this); + if (payloadCase_ == 2) { + if (imagePayloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = imagePayloadBuilder_.build(); + } + } + if (payloadCase_ == 3) { + if (textPayloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = textPayloadBuilder_.build(); + } + } + if (payloadCase_ == 4) { + if (videoPayloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = videoPayloadBuilder_.build(); + } + } + if (payloadCase_ == 5) { + if (audioPayloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = audioPayloadBuilder_.build(); + } + } + result.name_ = name_; + result.payloadCase_ = payloadCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.DataItem) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.DataItem) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.DataItem other) { + if (other == com.google.cloud.datalabeling.v1beta1.DataItem.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + switch (other.getPayloadCase()) { + case IMAGE_PAYLOAD: + { + mergeImagePayload(other.getImagePayload()); + break; + } + case TEXT_PAYLOAD: + { + mergeTextPayload(other.getTextPayload()); + break; + } + case VIDEO_PAYLOAD: + { + mergeVideoPayload(other.getVideoPayload()); + break; + } + case AUDIO_PAYLOAD: + { + mergeAudioPayload(other.getAudioPayload()); + break; + } + case PAYLOAD_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.DataItem parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datalabeling.v1beta1.DataItem) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int payloadCase_ = 0; + private java.lang.Object payload_; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImagePayload, + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder, + com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder> + imagePayloadBuilder_; + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public boolean hasImagePayload() { + return payloadCase_ == 2; + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public com.google.cloud.datalabeling.v1beta1.ImagePayload getImagePayload() { + if (imagePayloadBuilder_ == null) { + if (payloadCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } else { + if (payloadCase_ == 2) { + return imagePayloadBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public Builder setImagePayload(com.google.cloud.datalabeling.v1beta1.ImagePayload value) { + if (imagePayloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + imagePayloadBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public Builder setImagePayload( + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder builderForValue) { + if (imagePayloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + imagePayloadBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 2; + return this; + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public Builder mergeImagePayload(com.google.cloud.datalabeling.v1beta1.ImagePayload value) { + if (imagePayloadBuilder_ == null) { + if (payloadCase_ == 2 + && payload_ + != com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance()) { + payload_ = + com.google.cloud.datalabeling.v1beta1.ImagePayload.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 2) { + imagePayloadBuilder_.mergeFrom(value); + } + imagePayloadBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public Builder clearImagePayload() { + if (imagePayloadBuilder_ == null) { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + } + imagePayloadBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder getImagePayloadBuilder() { + return getImagePayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder getImagePayloadOrBuilder() { + if ((payloadCase_ == 2) && (imagePayloadBuilder_ != null)) { + return imagePayloadBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImagePayload, + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder, + com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder> + getImagePayloadFieldBuilder() { + if (imagePayloadBuilder_ == null) { + if (!(payloadCase_ == 2)) { + payload_ = com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } + imagePayloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImagePayload, + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder, + com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 2; + onChanged(); + ; + return imagePayloadBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextPayload, + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder, + com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder> + textPayloadBuilder_; + /** + * + * + *
+     * The text payload, a container of text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + public boolean hasTextPayload() { + return payloadCase_ == 3; + } + /** + * + * + *
+     * The text payload, a container of text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + public com.google.cloud.datalabeling.v1beta1.TextPayload getTextPayload() { + if (textPayloadBuilder_ == null) { + if (payloadCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } else { + if (payloadCase_ == 3) { + return textPayloadBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The text payload, a container of text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + public Builder setTextPayload(com.google.cloud.datalabeling.v1beta1.TextPayload value) { + if (textPayloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + textPayloadBuilder_.setMessage(value); + } + payloadCase_ = 3; + return this; + } + /** + * + * + *
+     * The text payload, a container of text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + public Builder setTextPayload( + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder builderForValue) { + if (textPayloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + textPayloadBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 3; + return this; + } + /** + * + * + *
+     * The text payload, a container of text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + public Builder mergeTextPayload(com.google.cloud.datalabeling.v1beta1.TextPayload value) { + if (textPayloadBuilder_ == null) { + if (payloadCase_ == 3 + && payload_ != com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance()) { + payload_ = + com.google.cloud.datalabeling.v1beta1.TextPayload.newBuilder( + (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 3) { + textPayloadBuilder_.mergeFrom(value); + } + textPayloadBuilder_.setMessage(value); + } + payloadCase_ = 3; + return this; + } + /** + * + * + *
+     * The text payload, a container of text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + public Builder clearTextPayload() { + if (textPayloadBuilder_ == null) { + if (payloadCase_ == 3) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 3) { + payloadCase_ = 0; + payload_ = null; + } + textPayloadBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The text payload, a container of text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + public com.google.cloud.datalabeling.v1beta1.TextPayload.Builder getTextPayloadBuilder() { + return getTextPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The text payload, a container of text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + public com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder getTextPayloadOrBuilder() { + if ((payloadCase_ == 3) && (textPayloadBuilder_ != null)) { + return textPayloadBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The text payload, a container of text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextPayload, + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder, + com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder> + getTextPayloadFieldBuilder() { + if (textPayloadBuilder_ == null) { + if (!(payloadCase_ == 3)) { + payload_ = com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } + textPayloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextPayload, + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder, + com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 3; + onChanged(); + ; + return textPayloadBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoPayload, + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder, + com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder> + videoPayloadBuilder_; + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + public boolean hasVideoPayload() { + return payloadCase_ == 4; + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + public com.google.cloud.datalabeling.v1beta1.VideoPayload getVideoPayload() { + if (videoPayloadBuilder_ == null) { + if (payloadCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } else { + if (payloadCase_ == 4) { + return videoPayloadBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + public Builder setVideoPayload(com.google.cloud.datalabeling.v1beta1.VideoPayload value) { + if (videoPayloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + videoPayloadBuilder_.setMessage(value); + } + payloadCase_ = 4; + return this; + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + public Builder setVideoPayload( + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder builderForValue) { + if (videoPayloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + videoPayloadBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 4; + return this; + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + public Builder mergeVideoPayload(com.google.cloud.datalabeling.v1beta1.VideoPayload value) { + if (videoPayloadBuilder_ == null) { + if (payloadCase_ == 4 + && payload_ + != com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance()) { + payload_ = + com.google.cloud.datalabeling.v1beta1.VideoPayload.newBuilder( + (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 4) { + videoPayloadBuilder_.mergeFrom(value); + } + videoPayloadBuilder_.setMessage(value); + } + payloadCase_ = 4; + return this; + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + public Builder clearVideoPayload() { + if (videoPayloadBuilder_ == null) { + if (payloadCase_ == 4) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 4) { + payloadCase_ = 0; + payload_ = null; + } + videoPayloadBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + public com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder getVideoPayloadBuilder() { + return getVideoPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + public com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder getVideoPayloadOrBuilder() { + if ((payloadCase_ == 4) && (videoPayloadBuilder_ != null)) { + return videoPayloadBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoPayload, + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder, + com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder> + getVideoPayloadFieldBuilder() { + if (videoPayloadBuilder_ == null) { + if (!(payloadCase_ == 4)) { + payload_ = com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } + videoPayloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoPayload, + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder, + com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 4; + onChanged(); + ; + return videoPayloadBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AudioPayload, + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder, + com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder> + audioPayloadBuilder_; + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + public boolean hasAudioPayload() { + return payloadCase_ == 5; + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + public com.google.cloud.datalabeling.v1beta1.AudioPayload getAudioPayload() { + if (audioPayloadBuilder_ == null) { + if (payloadCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } else { + if (payloadCase_ == 5) { + return audioPayloadBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + public Builder setAudioPayload(com.google.cloud.datalabeling.v1beta1.AudioPayload value) { + if (audioPayloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + audioPayloadBuilder_.setMessage(value); + } + payloadCase_ = 5; + return this; + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + public Builder setAudioPayload( + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder builderForValue) { + if (audioPayloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + audioPayloadBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 5; + return this; + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + public Builder mergeAudioPayload(com.google.cloud.datalabeling.v1beta1.AudioPayload value) { + if (audioPayloadBuilder_ == null) { + if (payloadCase_ == 5 + && payload_ + != com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance()) { + payload_ = + com.google.cloud.datalabeling.v1beta1.AudioPayload.newBuilder( + (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 5) { + audioPayloadBuilder_.mergeFrom(value); + } + audioPayloadBuilder_.setMessage(value); + } + payloadCase_ = 5; + return this; + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + public Builder clearAudioPayload() { + if (audioPayloadBuilder_ == null) { + if (payloadCase_ == 5) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 5) { + payloadCase_ = 0; + payload_ = null; + } + audioPayloadBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + public com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder getAudioPayloadBuilder() { + return getAudioPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + public com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder getAudioPayloadOrBuilder() { + if ((payloadCase_ == 5) && (audioPayloadBuilder_ != null)) { + return audioPayloadBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AudioPayload, + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder, + com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder> + getAudioPayloadFieldBuilder() { + if (audioPayloadBuilder_ == null) { + if (!(payloadCase_ == 5)) { + payload_ = com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } + audioPayloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AudioPayload, + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder, + com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 5; + onChanged(); + ; + return audioPayloadBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of the data item, in format of:
+     * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the data item, in format of:
+     * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the data item, in format of:
+     * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the data item, in format of:
+     * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the data item, in format of:
+     * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.DataItem) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.DataItem) + private static final com.google.cloud.datalabeling.v1beta1.DataItem DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.DataItem(); + } + + public static com.google.cloud.datalabeling.v1beta1.DataItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DataItem(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DataItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataItemName.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataItemName.java new file mode 100644 index 000000000000..5ba22595caae --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataItemName.java @@ -0,0 +1,208 @@ +/* + * 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.datalabeling.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 DataItemName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/datasets/{dataset}/dataItems/{data_item}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String dataset; + private final String dataItem; + + public String getProject() { + return project; + } + + public String getDataset() { + return dataset; + } + + public String getDataItem() { + return dataItem; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private DataItemName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + dataItem = Preconditions.checkNotNull(builder.getDataItem()); + } + + public static DataItemName of(String project, String dataset, String dataItem) { + return newBuilder().setProject(project).setDataset(dataset).setDataItem(dataItem).build(); + } + + public static String format(String project, String dataset, String dataItem) { + return newBuilder() + .setProject(project) + .setDataset(dataset) + .setDataItem(dataItem) + .build() + .toString(); + } + + public static DataItemName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "DataItemName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("dataset"), matchMap.get("data_item")); + } + + 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 (DataItemName 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("dataset", dataset); + fieldMapBuilder.put("dataItem", dataItem); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "dataset", dataset, "data_item", dataItem); + } + + /** Builder for DataItemName. */ + public static class Builder { + + private String project; + private String dataset; + private String dataItem; + + public String getProject() { + return project; + } + + public String getDataset() { + return dataset; + } + + public String getDataItem() { + return dataItem; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setDataItem(String dataItem) { + this.dataItem = dataItem; + return this; + } + + private Builder() {} + + private Builder(DataItemName dataItemName) { + project = dataItemName.project; + dataset = dataItemName.dataset; + dataItem = dataItemName.dataItem; + } + + public DataItemName build() { + return new DataItemName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof DataItemName) { + DataItemName that = (DataItemName) o; + return (this.project.equals(that.project)) + && (this.dataset.equals(that.dataset)) + && (this.dataItem.equals(that.dataItem)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= dataset.hashCode(); + h *= 1000003; + h ^= dataItem.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataItemOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataItemOrBuilder.java new file mode 100644 index 000000000000..595b272a3851 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataItemOrBuilder.java @@ -0,0 +1,159 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface DataItemOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.DataItem) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + boolean hasImagePayload(); + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + com.google.cloud.datalabeling.v1beta1.ImagePayload getImagePayload(); + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder getImagePayloadOrBuilder(); + + /** + * + * + *
+   * The text payload, a container of text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + boolean hasTextPayload(); + /** + * + * + *
+   * The text payload, a container of text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + com.google.cloud.datalabeling.v1beta1.TextPayload getTextPayload(); + /** + * + * + *
+   * The text payload, a container of text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 3; + */ + com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder getTextPayloadOrBuilder(); + + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + boolean hasVideoPayload(); + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + com.google.cloud.datalabeling.v1beta1.VideoPayload getVideoPayload(); + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 4; + */ + com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder getVideoPayloadOrBuilder(); + + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + boolean hasAudioPayload(); + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + com.google.cloud.datalabeling.v1beta1.AudioPayload getAudioPayload(); + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 5; + */ + com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder getAudioPayloadOrBuilder(); + + /** + * + * + *
+   * Output only. Name of the data item, in format of:
+   * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of the data item, in format of:
+   * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + public com.google.cloud.datalabeling.v1beta1.DataItem.PayloadCase getPayloadCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceOuterClass.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceOuterClass.java new file mode 100644 index 000000000000..11210eaffd27 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceOuterClass.java @@ -0,0 +1,698 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public final class DataLabelingServiceOuterClass { + private DataLabelingServiceOuterClass() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_CreateDatasetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_CreateDatasetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_GetDatasetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_GetDatasetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_DeleteDatasetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_DeleteDatasetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ImportDataRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ImportDataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ExportDataRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ExportDataRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_GetDataItemRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_GetDataItemRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_GetAnnotatedDatasetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_GetAnnotatedDatasetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotatedDatasetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotatedDatasetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelImageRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelImageRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelTextRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelTextRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelAudioRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelAudioRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_GetExampleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_GetExampleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListExamplesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListExamplesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListExamplesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListExamplesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_CreateAnnotationSpecSetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_CreateAnnotationSpecSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_GetAnnotationSpecSetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_GetAnnotationSpecSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotationSpecSetRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotationSpecSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_GetInstructionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_GetInstructionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_DeleteInstructionRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_DeleteInstructionRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n=google/cloud/datalabeling/v1beta1/data" + + "_labeling_service.proto\022!google.cloud.da" + + "talabeling.v1beta1\032\034google/api/annotatio" + + "ns.proto\032;google/cloud/datalabeling/v1be" + + "ta1/annotation_spec_set.proto\032/google/cl" + + "oud/datalabeling/v1beta1/dataset.proto\032?" + + "google/cloud/datalabeling/v1beta1/human_" + + "annotation_config.proto\0323google/cloud/da" + + "talabeling/v1beta1/instruction.proto\0322go" + + "ogle/cloud/datalabeling/v1beta1/operatio" + + "ns.proto\032#google/longrunning/operations." + + "proto\032\033google/protobuf/empty.proto\032 goog" + + "le/protobuf/field_mask.proto\"c\n\024CreateDa" + + "tasetRequest\022\016\n\006parent\030\001 \001(\t\022;\n\007dataset\030" + + "\002 \001(\0132*.google.cloud.datalabeling.v1beta" + + "1.Dataset\"!\n\021GetDatasetRequest\022\014\n\004name\030\001" + + " \001(\t\"\\\n\023ListDatasetsRequest\022\016\n\006parent\030\001 " + + "\001(\t\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022" + + "\n\npage_token\030\004 \001(\t\"m\n\024ListDatasetsRespon" + + "se\022<\n\010datasets\030\001 \003(\0132*.google.cloud.data" + + "labeling.v1beta1.Dataset\022\027\n\017next_page_to" + + "ken\030\002 \001(\t\"$\n\024DeleteDatasetRequest\022\014\n\004nam" + + "e\030\001 \001(\t\"g\n\021ImportDataRequest\022\014\n\004name\030\001 \001" + + "(\t\022D\n\014input_config\030\002 \001(\0132..google.cloud." + + "datalabeling.v1beta1.InputConfig\"\224\001\n\021Exp" + + "ortDataRequest\022\014\n\004name\030\001 \001(\t\022\031\n\021annotate" + + "d_dataset\030\002 \001(\t\022\016\n\006filter\030\003 \001(\t\022F\n\routpu" + + "t_config\030\004 \001(\0132/.google.cloud.datalabeli" + + "ng.v1beta1.OutputConfig\"\"\n\022GetDataItemRe" + + "quest\022\014\n\004name\030\001 \001(\t\"]\n\024ListDataItemsRequ" + + "est\022\016\n\006parent\030\001 \001(\t\022\016\n\006filter\030\002 \001(\t\022\021\n\tp" + + "age_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"q\n\025Li" + + "stDataItemsResponse\022?\n\ndata_items\030\001 \003(\0132" + + "+.google.cloud.datalabeling.v1beta1.Data" + + "Item\022\027\n\017next_page_token\030\002 \001(\t\"*\n\032GetAnno" + + "tatedDatasetRequest\022\014\n\004name\030\001 \001(\t\"e\n\034Lis" + + "tAnnotatedDatasetsRequest\022\016\n\006parent\030\001 \001(" + + "\t\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\n" + + "page_token\030\004 \001(\t\"-\n\035DeleteAnnotatedDatas" + + "etRequest\022\014\n\004name\030\001 \001(\t\"\211\001\n\035ListAnnotate" + + "dDatasetsResponse\022O\n\022annotated_datasets\030" + + "\001 \003(\01323.google.cloud.datalabeling.v1beta" + + "1.AnnotatedDataset\022\027\n\017next_page_token\030\002 " + + "\001(\t\"\315\005\n\021LabelImageRequest\022c\n\033image_class" + + "ification_config\030\004 \001(\0132<.google.cloud.da" + + "talabeling.v1beta1.ImageClassificationCo" + + "nfigH\000\022U\n\024bounding_poly_config\030\005 \001(\01325.g" + + "oogle.cloud.datalabeling.v1beta1.Boundin" + + "gPolyConfigH\000\022L\n\017polyline_config\030\006 \001(\01321" + + ".google.cloud.datalabeling.v1beta1.Polyl" + + "ineConfigH\000\022T\n\023segmentation_config\030\007 \001(\013" + + "25.google.cloud.datalabeling.v1beta1.Seg" + + "mentationConfigH\000\022\016\n\006parent\030\001 \001(\t\022N\n\014bas" + + "ic_config\030\002 \001(\01328.google.cloud.datalabel" + + "ing.v1beta1.HumanAnnotationConfig\022M\n\007fea" + + "ture\030\003 \001(\0162<.google.cloud.datalabeling.v" + + "1beta1.LabelImageRequest.Feature\"\226\001\n\007Fea" + + "ture\022\027\n\023FEATURE_UNSPECIFIED\020\000\022\022\n\016CLASSIF" + + "ICATION\020\001\022\020\n\014BOUNDING_BOX\020\002\022\031\n\025ORIENTED_" + + "BOUNDING_BOX\020\006\022\021\n\rBOUNDING_POLY\020\003\022\014\n\010POL" + + "YLINE\020\004\022\020\n\014SEGMENTATION\020\005B\020\n\016request_con" + + "fig\"\247\005\n\021LabelVideoRequest\022c\n\033video_class" + + "ification_config\030\004 \001(\0132<.google.cloud.da" + + "talabeling.v1beta1.VideoClassificationCo" + + "nfigH\000\022[\n\027object_detection_config\030\005 \001(\0132" + + "8.google.cloud.datalabeling.v1beta1.Obje" + + "ctDetectionConfigH\000\022Y\n\026object_tracking_c" + + "onfig\030\006 \001(\01327.google.cloud.datalabeling." + + "v1beta1.ObjectTrackingConfigH\000\022F\n\014event_" + + "config\030\007 \001(\0132..google.cloud.datalabeling" + + ".v1beta1.EventConfigH\000\022\016\n\006parent\030\001 \001(\t\022N" + + "\n\014basic_config\030\002 \001(\01328.google.cloud.data" + + "labeling.v1beta1.HumanAnnotationConfig\022M" + + "\n\007feature\030\003 \001(\0162<.google.cloud.datalabel" + + "ing.v1beta1.LabelVideoRequest.Feature\"l\n" + + "\007Feature\022\027\n\023FEATURE_UNSPECIFIED\020\000\022\022\n\016CLA" + + "SSIFICATION\020\001\022\024\n\020OBJECT_DETECTION\020\002\022\023\n\017O" + + "BJECT_TRACKING\020\003\022\t\n\005EVENT\020\004B\020\n\016request_c" + + "onfig\"\366\003\n\020LabelTextRequest\022a\n\032text_class" + + "ification_config\030\004 \001(\0132;.google.cloud.da" + + "talabeling.v1beta1.TextClassificationCon" + + "figH\000\022f\n\035text_entity_extraction_config\030\005" + + " \001(\0132=.google.cloud.datalabeling.v1beta1" + + ".TextEntityExtractionConfigH\000\022\016\n\006parent\030" + + "\001 \001(\t\022N\n\014basic_config\030\002 \001(\01328.google.clo" + + "ud.datalabeling.v1beta1.HumanAnnotationC" + + "onfig\022L\n\007feature\030\006 \001(\0162;.google.cloud.da" + + "talabeling.v1beta1.LabelTextRequest.Feat" + + "ure\"W\n\007Feature\022\027\n\023FEATURE_UNSPECIFIED\020\000\022" + + "\027\n\023TEXT_CLASSIFICATION\020\001\022\032\n\026TEXT_ENTITY_" + + "EXTRACTION\020\002B\020\n\016request_config\"\377\001\n\021Label" + + "AudioRequest\022\016\n\006parent\030\001 \001(\t\022N\n\014basic_co" + + "nfig\030\002 \001(\01328.google.cloud.datalabeling.v" + + "1beta1.HumanAnnotationConfig\022M\n\007feature\030" + + "\003 \001(\0162<.google.cloud.datalabeling.v1beta" + + "1.LabelAudioRequest.Feature\";\n\007Feature\022\027" + + "\n\023FEATURE_UNSPECIFIED\020\000\022\027\n\023AUDIO_TRANSCR" + + "IPTION\020\001\"1\n\021GetExampleRequest\022\014\n\004name\030\001 " + + "\001(\t\022\016\n\006filter\030\002 \001(\t\"\\\n\023ListExamplesReque" + + "st\022\016\n\006parent\030\001 \001(\t\022\016\n\006filter\030\002 \001(\t\022\021\n\tpa" + + "ge_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"m\n\024Lis" + + "tExamplesResponse\022<\n\010examples\030\001 \003(\0132*.go" + + "ogle.cloud.datalabeling.v1beta1.Example\022" + + "\027\n\017next_page_token\030\002 \001(\t\"\203\001\n\036CreateAnnot" + + "ationSpecSetRequest\022\016\n\006parent\030\001 \001(\t\022Q\n\023a" + + "nnotation_spec_set\030\002 \001(\01324.google.cloud." + + "datalabeling.v1beta1.AnnotationSpecSet\"+" + + "\n\033GetAnnotationSpecSetRequest\022\014\n\004name\030\001 " + + "\001(\t\"f\n\035ListAnnotationSpecSetsRequest\022\016\n\006" + + "parent\030\001 \001(\t\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_siz" + + "e\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"\215\001\n\036ListAnno" + + "tationSpecSetsResponse\022R\n\024annotation_spe" + + "c_sets\030\001 \003(\01324.google.cloud.datalabeling" + + ".v1beta1.AnnotationSpecSet\022\027\n\017next_page_" + + "token\030\002 \001(\t\".\n\036DeleteAnnotationSpecSetRe" + + "quest\022\014\n\004name\030\001 \001(\t\"o\n\030CreateInstruction" + + "Request\022\016\n\006parent\030\001 \001(\t\022C\n\013instruction\030\002" + + " \001(\0132..google.cloud.datalabeling.v1beta1" + + ".Instruction\"%\n\025GetInstructionRequest\022\014\n" + + "\004name\030\001 \001(\t\"(\n\030DeleteInstructionRequest\022" + + "\014\n\004name\030\001 \001(\t\"`\n\027ListInstructionsRequest" + + "\022\016\n\006parent\030\001 \001(\t\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage" + + "_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\"y\n\030ListI" + + "nstructionsResponse\022D\n\014instructions\030\001 \003(" + + "\0132..google.cloud.datalabeling.v1beta1.In" + + "struction\022\027\n\017next_page_token\030\002 \001(\t2\256#\n\023D" + + "ataLabelingService\022\246\001\n\rCreateDataset\0227.g" + + "oogle.cloud.datalabeling.v1beta1.CreateD" + + "atasetRequest\032*.google.cloud.datalabelin" + + "g.v1beta1.Dataset\"0\202\323\344\223\002*\"%/v1beta1/{par" + + "ent=projects/*}/datasets:\001*\022\235\001\n\nGetDatas" + + "et\0224.google.cloud.datalabeling.v1beta1.G" + + "etDatasetRequest\032*.google.cloud.datalabe" + + "ling.v1beta1.Dataset\"-\202\323\344\223\002\'\022%/v1beta1/{" + + "name=projects/*/datasets/*}\022\256\001\n\014ListData" + + "sets\0226.google.cloud.datalabeling.v1beta1" + + ".ListDatasetsRequest\0327.google.cloud.data" + + "labeling.v1beta1.ListDatasetsResponse\"-\202" + + "\323\344\223\002\'\022%/v1beta1/{parent=projects/*}/data" + + "sets\022\217\001\n\rDeleteDataset\0227.google.cloud.da" + + "talabeling.v1beta1.DeleteDatasetRequest\032" + + "\026.google.protobuf.Empty\"-\202\323\344\223\002\'*%/v1beta" + + "1/{name=projects/*/datasets/*}\022\236\001\n\nImpor" + + "tData\0224.google.cloud.datalabeling.v1beta" + + "1.ImportDataRequest\032\035.google.longrunning" + + ".Operation\";\202\323\344\223\0025\"0/v1beta1/{name=proje" + + "cts/*/datasets/*}:importData:\001*\022\236\001\n\nExpo" + + "rtData\0224.google.cloud.datalabeling.v1bet" + + "a1.ExportDataRequest\032\035.google.longrunnin" + + "g.Operation\";\202\323\344\223\0025\"0/v1beta1/{name=proj" + + "ects/*/datasets/*}:exportData:\001*\022\254\001\n\013Get" + + "DataItem\0225.google.cloud.datalabeling.v1b" + + "eta1.GetDataItemRequest\032+.google.cloud.d" + + "atalabeling.v1beta1.DataItem\"9\202\323\344\223\0023\0221/v" + + "1beta1/{name=projects/*/datasets/*/dataI" + + "tems/*}\022\275\001\n\rListDataItems\0227.google.cloud" + + ".datalabeling.v1beta1.ListDataItemsReque" + + "st\0328.google.cloud.datalabeling.v1beta1.L" + + "istDataItemsResponse\"9\202\323\344\223\0023\0221/v1beta1/{" + + "parent=projects/*/datasets/*}/dataItems\022" + + "\314\001\n\023GetAnnotatedDataset\022=.google.cloud.d" + + "atalabeling.v1beta1.GetAnnotatedDatasetR" + + "equest\0323.google.cloud.datalabeling.v1bet" + + "a1.AnnotatedDataset\"A\202\323\344\223\002;\0229/v1beta1/{n" + + "ame=projects/*/datasets/*/annotatedDatas" + + "ets/*}\022\335\001\n\025ListAnnotatedDatasets\022?.googl" + + "e.cloud.datalabeling.v1beta1.ListAnnotat" + + "edDatasetsRequest\032@.google.cloud.datalab" + + "eling.v1beta1.ListAnnotatedDatasetsRespo" + + "nse\"A\202\323\344\223\002;\0229/v1beta1/{parent=projects/*" + + "/datasets/*}/annotatedDatasets\022\265\001\n\026Delet" + + "eAnnotatedDataset\022@.google.cloud.datalab" + + "eling.v1beta1.DeleteAnnotatedDatasetRequ" + + "est\032\026.google.protobuf.Empty\"A\202\323\344\223\002;*9/v1" + + "beta1/{name=projects/*/datasets/*/annota" + + "tedDatasets/*}\022\241\001\n\nLabelImage\0224.google.c" + + "loud.datalabeling.v1beta1.LabelImageRequ" + + "est\032\035.google.longrunning.Operation\">\202\323\344\223" + + "\0028\"3/v1beta1/{parent=projects/*/datasets" + + "/*}/image:label:\001*\022\241\001\n\nLabelVideo\0224.goog" + + "le.cloud.datalabeling.v1beta1.LabelVideo" + + "Request\032\035.google.longrunning.Operation\">" + + "\202\323\344\223\0028\"3/v1beta1/{parent=projects/*/data" + + "sets/*}/video:label:\001*\022\236\001\n\tLabelText\0223.g" + + "oogle.cloud.datalabeling.v1beta1.LabelTe" + + "xtRequest\032\035.google.longrunning.Operation" + + "\"=\202\323\344\223\0027\"2/v1beta1/{parent=projects/*/da" + + "tasets/*}/text:label:\001*\022\241\001\n\nLabelAudio\0224" + + ".google.cloud.datalabeling.v1beta1.Label" + + "AudioRequest\032\035.google.longrunning.Operat" + + "ion\">\202\323\344\223\0028\"3/v1beta1/{parent=projects/*" + + "/datasets/*}/audio:label:\001*\022\274\001\n\nGetExamp" + + "le\0224.google.cloud.datalabeling.v1beta1.G" + + "etExampleRequest\032*.google.cloud.datalabe" + + "ling.v1beta1.Example\"L\202\323\344\223\002F\022D/v1beta1/{" + + "name=projects/*/datasets/*/annotatedData" + + "sets/*/examples/*}\022\315\001\n\014ListExamples\0226.go" + + "ogle.cloud.datalabeling.v1beta1.ListExam" + + "plesRequest\0327.google.cloud.datalabeling." + + "v1beta1.ListExamplesResponse\"L\202\323\344\223\002F\022D/v" + + "1beta1/{parent=projects/*/datasets/*/ann" + + "otatedDatasets/*}/examples\022\316\001\n\027CreateAnn" + + "otationSpecSet\022A.google.cloud.datalabeli" + + "ng.v1beta1.CreateAnnotationSpecSetReques" + + "t\0324.google.cloud.datalabeling.v1beta1.An" + + "notationSpecSet\":\202\323\344\223\0024\"//v1beta1/{paren" + + "t=projects/*}/annotationSpecSets:\001*\022\305\001\n\024" + + "GetAnnotationSpecSet\022>.google.cloud.data" + + "labeling.v1beta1.GetAnnotationSpecSetReq" + + "uest\0324.google.cloud.datalabeling.v1beta1" + + ".AnnotationSpecSet\"7\202\323\344\223\0021\022//v1beta1/{na" + + "me=projects/*/annotationSpecSets/*}\022\326\001\n\026" + + "ListAnnotationSpecSets\022@.google.cloud.da" + + "talabeling.v1beta1.ListAnnotationSpecSet" + + "sRequest\032A.google.cloud.datalabeling.v1b" + + "eta1.ListAnnotationSpecSetsResponse\"7\202\323\344" + + "\223\0021\022//v1beta1/{parent=projects/*}/annota" + + "tionSpecSets\022\255\001\n\027DeleteAnnotationSpecSet" + + "\022A.google.cloud.datalabeling.v1beta1.Del" + + "eteAnnotationSpecSetRequest\032\026.google.pro" + + "tobuf.Empty\"7\202\323\344\223\0021*//v1beta1/{name=proj" + + "ects/*/annotationSpecSets/*}\022\245\001\n\021CreateI" + + "nstruction\022;.google.cloud.datalabeling.v" + + "1beta1.CreateInstructionRequest\032\035.google" + + ".longrunning.Operation\"4\202\323\344\223\002.\")/v1beta1" + + "/{parent=projects/*}/instructions:\001*\022\255\001\n" + + "\016GetInstruction\0228.google.cloud.datalabel" + + "ing.v1beta1.GetInstructionRequest\032..goog" + + "le.cloud.datalabeling.v1beta1.Instructio" + + "n\"1\202\323\344\223\002+\022)/v1beta1/{name=projects/*/ins" + + "tructions/*}\022\276\001\n\020ListInstructions\022:.goog" + + "le.cloud.datalabeling.v1beta1.ListInstru" + + "ctionsRequest\032;.google.cloud.datalabelin" + + "g.v1beta1.ListInstructionsResponse\"1\202\323\344\223" + + "\002+\022)/v1beta1/{parent=projects/*}/instruc" + + "tions\022\233\001\n\021DeleteInstruction\022;.google.clo" + + "ud.datalabeling.v1beta1.DeleteInstructio" + + "nRequest\032\026.google.protobuf.Empty\"1\202\323\344\223\002+" + + "*)/v1beta1/{name=projects/*/instructions" + + "/*}Bx\n%com.google.cloud.datalabeling.v1b" + + "eta1P\001ZMgoogle.golang.org/genproto/googl" + + "eapis/cloud/datalabeling/v1beta1;datalab" + + "elingb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass.getDescriptor(), + com.google.cloud.datalabeling.v1beta1.DatasetOuterClass.getDescriptor(), + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass.getDescriptor(), + com.google.cloud.datalabeling.v1beta1.InstructionOuterClass.getDescriptor(), + com.google.cloud.datalabeling.v1beta1.Operations.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }, + assigner); + internal_static_google_cloud_datalabeling_v1beta1_CreateDatasetRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datalabeling_v1beta1_CreateDatasetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_CreateDatasetRequest_descriptor, + new java.lang.String[] { + "Parent", "Dataset", + }); + internal_static_google_cloud_datalabeling_v1beta1_GetDatasetRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datalabeling_v1beta1_GetDatasetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_GetDatasetRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsResponse_descriptor, + new java.lang.String[] { + "Datasets", "NextPageToken", + }); + internal_static_google_cloud_datalabeling_v1beta1_DeleteDatasetRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_datalabeling_v1beta1_DeleteDatasetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_DeleteDatasetRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datalabeling_v1beta1_ImportDataRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_datalabeling_v1beta1_ImportDataRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ImportDataRequest_descriptor, + new java.lang.String[] { + "Name", "InputConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_ExportDataRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_datalabeling_v1beta1_ExportDataRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ExportDataRequest_descriptor, + new java.lang.String[] { + "Name", "AnnotatedDataset", "Filter", "OutputConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_GetDataItemRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_datalabeling_v1beta1_GetDataItemRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_GetDataItemRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsResponse_descriptor, + new java.lang.String[] { + "DataItems", "NextPageToken", + }); + internal_static_google_cloud_datalabeling_v1beta1_GetAnnotatedDatasetRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_datalabeling_v1beta1_GetAnnotatedDatasetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_GetAnnotatedDatasetRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", + }); + internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotatedDatasetRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotatedDatasetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotatedDatasetRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsResponse_descriptor, + new java.lang.String[] { + "AnnotatedDatasets", "NextPageToken", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelImageRequest_descriptor, + new java.lang.String[] { + "ImageClassificationConfig", + "BoundingPolyConfig", + "PolylineConfig", + "SegmentationConfig", + "Parent", + "BasicConfig", + "Feature", + "RequestConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoRequest_descriptor, + new java.lang.String[] { + "VideoClassificationConfig", + "ObjectDetectionConfig", + "ObjectTrackingConfig", + "EventConfig", + "Parent", + "BasicConfig", + "Feature", + "RequestConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelTextRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_datalabeling_v1beta1_LabelTextRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelTextRequest_descriptor, + new java.lang.String[] { + "TextClassificationConfig", + "TextEntityExtractionConfig", + "Parent", + "BasicConfig", + "Feature", + "RequestConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelAudioRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_datalabeling_v1beta1_LabelAudioRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelAudioRequest_descriptor, + new java.lang.String[] { + "Parent", "BasicConfig", "Feature", + }); + internal_static_google_cloud_datalabeling_v1beta1_GetExampleRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_datalabeling_v1beta1_GetExampleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_GetExampleRequest_descriptor, + new java.lang.String[] { + "Name", "Filter", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListExamplesRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_datalabeling_v1beta1_ListExamplesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListExamplesRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListExamplesResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_datalabeling_v1beta1_ListExamplesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListExamplesResponse_descriptor, + new java.lang.String[] { + "Examples", "NextPageToken", + }); + internal_static_google_cloud_datalabeling_v1beta1_CreateAnnotationSpecSetRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_datalabeling_v1beta1_CreateAnnotationSpecSetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_CreateAnnotationSpecSetRequest_descriptor, + new java.lang.String[] { + "Parent", "AnnotationSpecSet", + }); + internal_static_google_cloud_datalabeling_v1beta1_GetAnnotationSpecSetRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_datalabeling_v1beta1_GetAnnotationSpecSetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_GetAnnotationSpecSetRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsResponse_descriptor, + new java.lang.String[] { + "AnnotationSpecSets", "NextPageToken", + }); + internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotationSpecSetRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotationSpecSetRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotationSpecSetRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionRequest_descriptor, + new java.lang.String[] { + "Parent", "Instruction", + }); + internal_static_google_cloud_datalabeling_v1beta1_GetInstructionRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_datalabeling_v1beta1_GetInstructionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_GetInstructionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datalabeling_v1beta1_DeleteInstructionRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_datalabeling_v1beta1_DeleteInstructionRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_DeleteInstructionRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", + }); + internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsResponse_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsResponse_descriptor, + new java.lang.String[] { + "Instructions", "NextPageToken", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOuterClass.getDescriptor(); + com.google.cloud.datalabeling.v1beta1.DatasetOuterClass.getDescriptor(); + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass.getDescriptor(); + com.google.cloud.datalabeling.v1beta1.InstructionOuterClass.getDescriptor(); + com.google.cloud.datalabeling.v1beta1.Operations.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataType.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataType.java new file mode 100644 index 000000000000..818bad1ef0d9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DataType.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** Protobuf enum {@code google.cloud.datalabeling.v1beta1.DataType} */ +public enum DataType implements com.google.protobuf.ProtocolMessageEnum { + /** DATA_TYPE_UNSPECIFIED = 0; */ + DATA_TYPE_UNSPECIFIED(0), + /** IMAGE = 1; */ + IMAGE(1), + /** VIDEO = 2; */ + VIDEO(2), + /** TEXT = 4; */ + TEXT(4), + /** AUDIO = 5; */ + AUDIO(5), + UNRECOGNIZED(-1), + ; + + /** DATA_TYPE_UNSPECIFIED = 0; */ + public static final int DATA_TYPE_UNSPECIFIED_VALUE = 0; + /** IMAGE = 1; */ + public static final int IMAGE_VALUE = 1; + /** VIDEO = 2; */ + public static final int VIDEO_VALUE = 2; + /** TEXT = 4; */ + public static final int TEXT_VALUE = 4; + /** AUDIO = 5; */ + public static final int AUDIO_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static DataType valueOf(int value) { + return forNumber(value); + } + + public static DataType forNumber(int value) { + switch (value) { + case 0: + return DATA_TYPE_UNSPECIFIED; + case 1: + return IMAGE; + case 2: + return VIDEO; + case 4: + return TEXT; + case 5: + return AUDIO; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public DataType findValueByNumber(int number) { + return DataType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final DataType[] VALUES = values(); + + public static DataType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DataType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datalabeling.v1beta1.DataType) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Dataset.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Dataset.java new file mode 100644 index 000000000000..56a9a3462a17 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Dataset.java @@ -0,0 +1,1749 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Dataset is the resource to hold your data. You can request multiple labeling
+ * tasks for a dataset while each one will generate an AnnotatedDataset.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Dataset} + */ +public final class Dataset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.Dataset) + DatasetOrBuilder { + private static final long serialVersionUID = 0L; + // Use Dataset.newBuilder() to construct. + private Dataset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Dataset() { + name_ = ""; + displayName_ = ""; + description_ = ""; + inputConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Dataset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + inputConfigs_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; + } + inputConfigs_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.InputConfig.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000010) != 0)) { + inputConfigs_ = java.util.Collections.unmodifiableList(inputConfigs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Dataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Dataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Dataset.class, + com.google.cloud.datalabeling.v1beta1.Dataset.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only.
+   * Dataset resource name, format is:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only.
+   * Dataset resource name, format is:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The display name of the dataset. Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name of the dataset. Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. User-provided description of the annotation specification set.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User-provided description of the annotation specification set.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time the dataset is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Time the dataset is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Time the dataset is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int INPUT_CONFIGS_FIELD_NUMBER = 5; + private java.util.List inputConfigs_; + /** + * + * + *
+   * Output only. This is populated with the original input configs
+   * where ImportData is called. It is available only after the clients
+   * import data to this dataset.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public java.util.List getInputConfigsList() { + return inputConfigs_; + } + /** + * + * + *
+   * Output only. This is populated with the original input configs
+   * where ImportData is called. It is available only after the clients
+   * import data to this dataset.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public java.util.List + getInputConfigsOrBuilderList() { + return inputConfigs_; + } + /** + * + * + *
+   * Output only. This is populated with the original input configs
+   * where ImportData is called. It is available only after the clients
+   * import data to this dataset.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public int getInputConfigsCount() { + return inputConfigs_.size(); + } + /** + * + * + *
+   * Output only. This is populated with the original input configs
+   * where ImportData is called. It is available only after the clients
+   * import data to this dataset.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfig getInputConfigs(int index) { + return inputConfigs_.get(index); + } + /** + * + * + *
+   * Output only. This is populated with the original input configs
+   * where ImportData is called. It is available only after the clients
+   * import data to this dataset.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder getInputConfigsOrBuilder( + int index) { + return inputConfigs_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + for (int i = 0; i < inputConfigs_.size(); i++) { + output.writeMessage(5, inputConfigs_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + for (int i = 0; i < inputConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, inputConfigs_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.Dataset)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.Dataset other = + (com.google.cloud.datalabeling.v1beta1.Dataset) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getInputConfigsList().equals(other.getInputConfigsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (getInputConfigsCount() > 0) { + hash = (37 * hash) + INPUT_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getInputConfigsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.Dataset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Dataset is the resource to hold your data. You can request multiple labeling
+   * tasks for a dataset while each one will generate an AnnotatedDataset.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Dataset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.Dataset) + com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Dataset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Dataset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Dataset.class, + com.google.cloud.datalabeling.v1beta1.Dataset.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.Dataset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputConfigsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (inputConfigsBuilder_ == null) { + inputConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + } else { + inputConfigsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Dataset_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Dataset getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.Dataset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Dataset build() { + com.google.cloud.datalabeling.v1beta1.Dataset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Dataset buildPartial() { + com.google.cloud.datalabeling.v1beta1.Dataset result = + new com.google.cloud.datalabeling.v1beta1.Dataset(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (inputConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + inputConfigs_ = java.util.Collections.unmodifiableList(inputConfigs_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.inputConfigs_ = inputConfigs_; + } else { + result.inputConfigs_ = inputConfigsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.Dataset) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.Dataset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.Dataset other) { + if (other == com.google.cloud.datalabeling.v1beta1.Dataset.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (inputConfigsBuilder_ == null) { + if (!other.inputConfigs_.isEmpty()) { + if (inputConfigs_.isEmpty()) { + inputConfigs_ = other.inputConfigs_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureInputConfigsIsMutable(); + inputConfigs_.addAll(other.inputConfigs_); + } + onChanged(); + } + } else { + if (!other.inputConfigs_.isEmpty()) { + if (inputConfigsBuilder_.isEmpty()) { + inputConfigsBuilder_.dispose(); + inputConfigsBuilder_ = null; + inputConfigs_ = other.inputConfigs_; + bitField0_ = (bitField0_ & ~0x00000010); + inputConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInputConfigsFieldBuilder() + : null; + } else { + inputConfigsBuilder_.addAllMessages(other.inputConfigs_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.Dataset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datalabeling.v1beta1.Dataset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only.
+     * Dataset resource name, format is:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only.
+     * Dataset resource name, format is:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only.
+     * Dataset resource name, format is:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only.
+     * Dataset resource name, format is:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only.
+     * Dataset resource name, format is:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the dataset. Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name of the dataset. Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name of the dataset. Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the dataset. Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the dataset. Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. User-provided description of the annotation specification set.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification set.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification set.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification set.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided description of the annotation specification set.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Time the dataset is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Time the dataset is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Time the dataset is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the dataset is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the dataset is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Time the dataset is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Time the dataset is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time the dataset is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Time the dataset is created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private java.util.List inputConfigs_ = + java.util.Collections.emptyList(); + + private void ensureInputConfigsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + inputConfigs_ = + new java.util.ArrayList( + inputConfigs_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.InputConfig, + com.google.cloud.datalabeling.v1beta1.InputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder> + inputConfigsBuilder_; + + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public java.util.List getInputConfigsList() { + if (inputConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputConfigs_); + } else { + return inputConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public int getInputConfigsCount() { + if (inputConfigsBuilder_ == null) { + return inputConfigs_.size(); + } else { + return inputConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfig getInputConfigs(int index) { + if (inputConfigsBuilder_ == null) { + return inputConfigs_.get(index); + } else { + return inputConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public Builder setInputConfigs( + int index, com.google.cloud.datalabeling.v1beta1.InputConfig value) { + if (inputConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputConfigsIsMutable(); + inputConfigs_.set(index, value); + onChanged(); + } else { + inputConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public Builder setInputConfigs( + int index, com.google.cloud.datalabeling.v1beta1.InputConfig.Builder builderForValue) { + if (inputConfigsBuilder_ == null) { + ensureInputConfigsIsMutable(); + inputConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + inputConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public Builder addInputConfigs(com.google.cloud.datalabeling.v1beta1.InputConfig value) { + if (inputConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputConfigsIsMutable(); + inputConfigs_.add(value); + onChanged(); + } else { + inputConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public Builder addInputConfigs( + int index, com.google.cloud.datalabeling.v1beta1.InputConfig value) { + if (inputConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputConfigsIsMutable(); + inputConfigs_.add(index, value); + onChanged(); + } else { + inputConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public Builder addInputConfigs( + com.google.cloud.datalabeling.v1beta1.InputConfig.Builder builderForValue) { + if (inputConfigsBuilder_ == null) { + ensureInputConfigsIsMutable(); + inputConfigs_.add(builderForValue.build()); + onChanged(); + } else { + inputConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public Builder addInputConfigs( + int index, com.google.cloud.datalabeling.v1beta1.InputConfig.Builder builderForValue) { + if (inputConfigsBuilder_ == null) { + ensureInputConfigsIsMutable(); + inputConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + inputConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public Builder addAllInputConfigs( + java.lang.Iterable values) { + if (inputConfigsBuilder_ == null) { + ensureInputConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputConfigs_); + onChanged(); + } else { + inputConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public Builder clearInputConfigs() { + if (inputConfigsBuilder_ == null) { + inputConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + inputConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public Builder removeInputConfigs(int index) { + if (inputConfigsBuilder_ == null) { + ensureInputConfigsIsMutable(); + inputConfigs_.remove(index); + onChanged(); + } else { + inputConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfig.Builder getInputConfigsBuilder( + int index) { + return getInputConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder getInputConfigsOrBuilder( + int index) { + if (inputConfigsBuilder_ == null) { + return inputConfigs_.get(index); + } else { + return inputConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public java.util.List + getInputConfigsOrBuilderList() { + if (inputConfigsBuilder_ != null) { + return inputConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputConfigs_); + } + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfig.Builder addInputConfigsBuilder() { + return getInputConfigsFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.InputConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfig.Builder addInputConfigsBuilder( + int index) { + return getInputConfigsFieldBuilder() + .addBuilder( + index, com.google.cloud.datalabeling.v1beta1.InputConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. This is populated with the original input configs
+     * where ImportData is called. It is available only after the clients
+     * import data to this dataset.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + public java.util.List + getInputConfigsBuilderList() { + return getInputConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.InputConfig, + com.google.cloud.datalabeling.v1beta1.InputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder> + getInputConfigsFieldBuilder() { + if (inputConfigsBuilder_ == null) { + inputConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.InputConfig, + com.google.cloud.datalabeling.v1beta1.InputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder>( + inputConfigs_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + inputConfigs_ = null; + } + return inputConfigsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.Dataset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.Dataset) + private static final com.google.cloud.datalabeling.v1beta1.Dataset DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.Dataset(); + } + + public static com.google.cloud.datalabeling.v1beta1.Dataset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Dataset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Dataset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Dataset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DatasetName.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DatasetName.java new file mode 100644 index 000000000000..889fcd466f14 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DatasetName.java @@ -0,0 +1,180 @@ +/* + * 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.datalabeling.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 DatasetName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/datasets/{dataset}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String dataset; + + public String getProject() { + return project; + } + + public String getDataset() { + return dataset; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private DatasetName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + } + + public static DatasetName of(String project, String dataset) { + return newBuilder().setProject(project).setDataset(dataset).build(); + } + + public static String format(String project, String dataset) { + return newBuilder().setProject(project).setDataset(dataset).build().toString(); + } + + public static DatasetName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "DatasetName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("dataset")); + } + + 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 (DatasetName 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("dataset", dataset); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "dataset", dataset); + } + + /** Builder for DatasetName. */ + public static class Builder { + + private String project; + private String dataset; + + public String getProject() { + return project; + } + + public String getDataset() { + return dataset; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + private Builder() {} + + private Builder(DatasetName datasetName) { + project = datasetName.project; + dataset = datasetName.dataset; + } + + public DatasetName build() { + return new DatasetName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof DatasetName) { + DatasetName that = (DatasetName) o; + return (this.project.equals(that.project)) && (this.dataset.equals(that.dataset)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= dataset.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DatasetOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DatasetOrBuilder.java new file mode 100644 index 000000000000..5ca4a6e99ba9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DatasetOrBuilder.java @@ -0,0 +1,172 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface DatasetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.Dataset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only.
+   * Dataset resource name, format is:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only.
+   * Dataset resource name, format is:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the dataset. Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the dataset. Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-provided description of the annotation specification set.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. User-provided description of the annotation specification set.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Time the dataset is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Time the dataset is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Time the dataset is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. This is populated with the original input configs
+   * where ImportData is called. It is available only after the clients
+   * import data to this dataset.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + java.util.List getInputConfigsList(); + /** + * + * + *
+   * Output only. This is populated with the original input configs
+   * where ImportData is called. It is available only after the clients
+   * import data to this dataset.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + com.google.cloud.datalabeling.v1beta1.InputConfig getInputConfigs(int index); + /** + * + * + *
+   * Output only. This is populated with the original input configs
+   * where ImportData is called. It is available only after the clients
+   * import data to this dataset.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + int getInputConfigsCount(); + /** + * + * + *
+   * Output only. This is populated with the original input configs
+   * where ImportData is called. It is available only after the clients
+   * import data to this dataset.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + java.util.List + getInputConfigsOrBuilderList(); + /** + * + * + *
+   * Output only. This is populated with the original input configs
+   * where ImportData is called. It is available only after the clients
+   * import data to this dataset.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.InputConfig input_configs = 5; + */ + com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder getInputConfigsOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DatasetOuterClass.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DatasetOuterClass.java new file mode 100644 index 000000000000..d9ecfbc50ca3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DatasetOuterClass.java @@ -0,0 +1,388 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public final class DatasetOuterClass { + private DatasetOuterClass() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_Dataset_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_Dataset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_InputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_InputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_GcsSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_GcsSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_OutputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_OutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_GcsDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_GcsFolderDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_GcsFolderDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_DataItem_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_DataItem_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDataset_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDataset_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDatasetMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDatasetMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelStats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelStats_ExampleCountEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelStats_ExampleCountEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_Example_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_Example_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ImagePayload_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ImagePayload_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_TextPayload_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_TextPayload_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_VideoThumbnail_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_VideoThumbnail_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_VideoPayload_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_VideoPayload_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_AudioPayload_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_AudioPayload_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n/google/cloud/datalabeling/v1beta1/data" + + "set.proto\022!google.cloud.datalabeling.v1b" + + "eta1\0322google/cloud/datalabeling/v1beta1/" + + "annotation.proto\032?google/cloud/datalabel" + + "ing/v1beta1/human_annotation_config.prot" + + "o\032\036google/protobuf/duration.proto\032\034googl" + + "e/protobuf/struct.proto\032\037google/protobuf" + + "/timestamp.proto\032\034google/api/annotations" + + ".proto\"\272\001\n\007Dataset\022\014\n\004name\030\001 \001(\t\022\024\n\014disp" + + "lay_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022/\n\013c" + + "reate_time\030\004 \001(\0132\032.google.protobuf.Times" + + "tamp\022E\n\rinput_configs\030\005 \003(\0132..google.clo" + + "ud.datalabeling.v1beta1.InputConfig\"\233\001\n\013" + + "InputConfig\022B\n\ngcs_source\030\002 \001(\0132,.google" + + ".cloud.datalabeling.v1beta1.GcsSourceH\000\022" + + ">\n\tdata_type\030\001 \001(\0162+.google.cloud.datala" + + "beling.v1beta1.DataTypeB\010\n\006source\"1\n\tGcs" + + "Source\022\021\n\tinput_uri\030\001 \001(\t\022\021\n\tmime_type\030\002" + + " \001(\t\"\306\001\n\014OutputConfig\022L\n\017gcs_destination" + + "\030\001 \001(\01321.google.cloud.datalabeling.v1bet" + + "a1.GcsDestinationH\000\022Y\n\026gcs_folder_destin" + + "ation\030\002 \001(\01327.google.cloud.datalabeling." + + "v1beta1.GcsFolderDestinationH\000B\r\n\013destin" + + "ation\"7\n\016GcsDestination\022\022\n\noutput_uri\030\001 " + + "\001(\t\022\021\n\tmime_type\030\002 \001(\t\"1\n\024GcsFolderDesti" + + "nation\022\031\n\021output_folder_uri\030\001 \001(\t\"\311\002\n\010Da" + + "taItem\022H\n\rimage_payload\030\002 \001(\0132/.google.c" + + "loud.datalabeling.v1beta1.ImagePayloadH\000" + + "\022F\n\014text_payload\030\003 \001(\0132..google.cloud.da" + + "talabeling.v1beta1.TextPayloadH\000\022H\n\rvide" + + "o_payload\030\004 \001(\0132/.google.cloud.datalabel" + + "ing.v1beta1.VideoPayloadH\000\022H\n\raudio_payl" + + "oad\030\005 \001(\0132/.google.cloud.datalabeling.v1" + + "beta1.AudioPayloadH\000\022\014\n\004name\030\001 \001(\tB\t\n\007pa" + + "yload\"\343\003\n\020AnnotatedDataset\022\014\n\004name\030\001 \001(\t" + + "\022\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030\t " + + "\001(\t\022N\n\021annotation_source\030\003 \001(\01623.google." + + "cloud.datalabeling.v1beta1.AnnotationSou" + + "rce\022J\n\017annotation_type\030\010 \001(\01621.google.cl" + + "oud.datalabeling.v1beta1.AnnotationType\022" + + "\025\n\rexample_count\030\004 \001(\003\022\037\n\027completed_exam" + + "ple_count\030\005 \001(\003\022B\n\013label_stats\030\006 \001(\0132-.g" + + "oogle.cloud.datalabeling.v1beta1.LabelSt" + + "ats\022/\n\013create_time\030\007 \001(\0132\032.google.protob" + + "uf.Timestamp\022M\n\010metadata\030\n \001(\0132;.google." + + "cloud.datalabeling.v1beta1.AnnotatedData" + + "setMetadata\"\242\010\n\030AnnotatedDatasetMetadata" + + "\022Y\n\027human_annotation_config\030\001 \001(\01328.goog" + + "le.cloud.datalabeling.v1beta1.HumanAnnot" + + "ationConfig\022c\n\033image_classification_conf" + + "ig\030\002 \001(\0132<.google.cloud.datalabeling.v1b" + + "eta1.ImageClassificationConfigH\000\022U\n\024boun" + + "ding_poly_config\030\003 \001(\01325.google.cloud.da" + + "talabeling.v1beta1.BoundingPolyConfigH\000\022" + + "L\n\017polyline_config\030\004 \001(\01321.google.cloud." + + "datalabeling.v1beta1.PolylineConfigH\000\022T\n" + + "\023segmentation_config\030\005 \001(\01325.google.clou" + + "d.datalabeling.v1beta1.SegmentationConfi" + + "gH\000\022c\n\033video_classification_config\030\006 \001(\013" + + "2<.google.cloud.datalabeling.v1beta1.Vid" + + "eoClassificationConfigH\000\022[\n\027object_detec" + + "tion_config\030\007 \001(\01328.google.cloud.datalab" + + "eling.v1beta1.ObjectDetectionConfigH\000\022Y\n" + + "\026object_tracking_config\030\010 \001(\01327.google.c" + + "loud.datalabeling.v1beta1.ObjectTracking" + + "ConfigH\000\022F\n\014event_config\030\t \001(\0132..google." + + "cloud.datalabeling.v1beta1.EventConfigH\000" + + "\022a\n\032text_classification_config\030\n \001(\0132;.g" + + "oogle.cloud.datalabeling.v1beta1.TextCla" + + "ssificationConfigH\000\022f\n\035text_entity_extra" + + "ction_config\030\013 \001(\0132=.google.cloud.datala" + + "beling.v1beta1.TextEntityExtractionConfi" + + "gH\000B\033\n\031annotation_request_config\"\231\001\n\nLab" + + "elStats\022V\n\rexample_count\030\001 \003(\0132?.google." + + "cloud.datalabeling.v1beta1.LabelStats.Ex" + + "ampleCountEntry\0323\n\021ExampleCountEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\003:\0028\001\"\214\003\n\007Example" + + "\022H\n\rimage_payload\030\002 \001(\0132/.google.cloud.d" + + "atalabeling.v1beta1.ImagePayloadH\000\022F\n\014te" + + "xt_payload\030\006 \001(\0132..google.cloud.datalabe" + + "ling.v1beta1.TextPayloadH\000\022H\n\rvideo_payl" + + "oad\030\007 \001(\0132/.google.cloud.datalabeling.v1" + + "beta1.VideoPayloadH\000\022H\n\raudio_payload\030\010 " + + "\001(\0132/.google.cloud.datalabeling.v1beta1." + + "AudioPayloadH\000\022\014\n\004name\030\001 \001(\t\022B\n\013annotati" + + "ons\030\005 \003(\0132-.google.cloud.datalabeling.v1" + + "beta1.AnnotationB\t\n\007payload\"M\n\014ImagePayl" + + "oad\022\021\n\tmime_type\030\001 \001(\t\022\027\n\017image_thumbnai" + + "l\030\002 \001(\014\022\021\n\timage_uri\030\003 \001(\t\"#\n\013TextPayloa" + + "d\022\024\n\014text_content\030\001 \001(\t\"S\n\016VideoThumbnai" + + "l\022\021\n\tthumbnail\030\001 \001(\014\022.\n\013time_offset\030\002 \001(" + + "\0132\031.google.protobuf.Duration\"\225\001\n\014VideoPa" + + "yload\022\021\n\tmime_type\030\001 \001(\t\022\021\n\tvideo_uri\030\002 " + + "\001(\t\022K\n\020video_thumbnails\030\003 \003(\01321.google.c" + + "loud.datalabeling.v1beta1.VideoThumbnail" + + "\022\022\n\nframe_rate\030\004 \001(\002\"<\n\014AudioPayload\022\021\n\t" + + "audio_uri\030\001 \001(\t\022\031\n\021sample_rate_hertz\030\003 \001" + + "(\005*P\n\010DataType\022\031\n\025DATA_TYPE_UNSPECIFIED\020" + + "\000\022\t\n\005IMAGE\020\001\022\t\n\005VIDEO\020\002\022\010\n\004TEXT\020\004\022\t\n\005AUD" + + "IO\020\005Bx\n%com.google.cloud.datalabeling.v1" + + "beta1P\001ZMgoogle.golang.org/genproto/goog" + + "leapis/cloud/datalabeling/v1beta1;datala" + + "belingb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass.getDescriptor(), + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }, + assigner); + internal_static_google_cloud_datalabeling_v1beta1_Dataset_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datalabeling_v1beta1_Dataset_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_Dataset_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "Description", "CreateTime", "InputConfigs", + }); + internal_static_google_cloud_datalabeling_v1beta1_InputConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datalabeling_v1beta1_InputConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_InputConfig_descriptor, + new java.lang.String[] { + "GcsSource", "DataType", "Source", + }); + internal_static_google_cloud_datalabeling_v1beta1_GcsSource_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datalabeling_v1beta1_GcsSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_GcsSource_descriptor, + new java.lang.String[] { + "InputUri", "MimeType", + }); + internal_static_google_cloud_datalabeling_v1beta1_OutputConfig_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_datalabeling_v1beta1_OutputConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_OutputConfig_descriptor, + new java.lang.String[] { + "GcsDestination", "GcsFolderDestination", "Destination", + }); + internal_static_google_cloud_datalabeling_v1beta1_GcsDestination_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_datalabeling_v1beta1_GcsDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_GcsDestination_descriptor, + new java.lang.String[] { + "OutputUri", "MimeType", + }); + internal_static_google_cloud_datalabeling_v1beta1_GcsFolderDestination_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_datalabeling_v1beta1_GcsFolderDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_GcsFolderDestination_descriptor, + new java.lang.String[] { + "OutputFolderUri", + }); + internal_static_google_cloud_datalabeling_v1beta1_DataItem_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_datalabeling_v1beta1_DataItem_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_DataItem_descriptor, + new java.lang.String[] { + "ImagePayload", "TextPayload", "VideoPayload", "AudioPayload", "Name", "Payload", + }); + internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDataset_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDataset_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDataset_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "AnnotationSource", + "AnnotationType", + "ExampleCount", + "CompletedExampleCount", + "LabelStats", + "CreateTime", + "Metadata", + }); + internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDatasetMetadata_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDatasetMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_AnnotatedDatasetMetadata_descriptor, + new java.lang.String[] { + "HumanAnnotationConfig", + "ImageClassificationConfig", + "BoundingPolyConfig", + "PolylineConfig", + "SegmentationConfig", + "VideoClassificationConfig", + "ObjectDetectionConfig", + "ObjectTrackingConfig", + "EventConfig", + "TextClassificationConfig", + "TextEntityExtractionConfig", + "AnnotationRequestConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelStats_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_datalabeling_v1beta1_LabelStats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelStats_descriptor, + new java.lang.String[] { + "ExampleCount", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelStats_ExampleCountEntry_descriptor = + internal_static_google_cloud_datalabeling_v1beta1_LabelStats_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_datalabeling_v1beta1_LabelStats_ExampleCountEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelStats_ExampleCountEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_datalabeling_v1beta1_Example_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_datalabeling_v1beta1_Example_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_Example_descriptor, + new java.lang.String[] { + "ImagePayload", + "TextPayload", + "VideoPayload", + "AudioPayload", + "Name", + "Annotations", + "Payload", + }); + internal_static_google_cloud_datalabeling_v1beta1_ImagePayload_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_datalabeling_v1beta1_ImagePayload_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ImagePayload_descriptor, + new java.lang.String[] { + "MimeType", "ImageThumbnail", "ImageUri", + }); + internal_static_google_cloud_datalabeling_v1beta1_TextPayload_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_datalabeling_v1beta1_TextPayload_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_TextPayload_descriptor, + new java.lang.String[] { + "TextContent", + }); + internal_static_google_cloud_datalabeling_v1beta1_VideoThumbnail_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_datalabeling_v1beta1_VideoThumbnail_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_VideoThumbnail_descriptor, + new java.lang.String[] { + "Thumbnail", "TimeOffset", + }); + internal_static_google_cloud_datalabeling_v1beta1_VideoPayload_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_datalabeling_v1beta1_VideoPayload_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_VideoPayload_descriptor, + new java.lang.String[] { + "MimeType", "VideoUri", "VideoThumbnails", "FrameRate", + }); + internal_static_google_cloud_datalabeling_v1beta1_AudioPayload_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_datalabeling_v1beta1_AudioPayload_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_AudioPayload_descriptor, + new java.lang.String[] { + "AudioUri", "SampleRateHertz", + }); + com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass.getDescriptor(); + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotatedDatasetRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotatedDatasetRequest.java new file mode 100644 index 000000000000..3c8a8a834bdc --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotatedDatasetRequest.java @@ -0,0 +1,624 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for DeleteAnnotatedDataset.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest} + */ +public final class DeleteAnnotatedDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest) + DeleteAnnotatedDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAnnotatedDatasetRequest.newBuilder() to construct. + private DeleteAnnotatedDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAnnotatedDatasetRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteAnnotatedDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotatedDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotatedDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest.class, + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the annotated dataset to delete, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the annotated dataset to delete, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest other = + (com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for DeleteAnnotatedDataset.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest) + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotatedDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotatedDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest.class, + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotatedDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest build() { + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest result = + new com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest other) { + if (other + == com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the annotated dataset to delete, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the annotated dataset to delete, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the annotated dataset to delete, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the annotated dataset to delete, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the annotated dataset to delete, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest) + private static final com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAnnotatedDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteAnnotatedDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotatedDatasetRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotatedDatasetRequestOrBuilder.java new file mode 100644 index 000000000000..3090dcd743e7 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotatedDatasetRequestOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface DeleteAnnotatedDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the annotated dataset to delete, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the annotated dataset to delete, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotationSpecSetRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotationSpecSetRequest.java new file mode 100644 index 000000000000..4aaa6873f3a5 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotationSpecSetRequest.java @@ -0,0 +1,618 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for DeleteAnnotationSpecSet.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest} + */ +public final class DeleteAnnotationSpecSetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest) + DeleteAnnotationSpecSetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAnnotationSpecSetRequest.newBuilder() to construct. + private DeleteAnnotationSpecSetRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAnnotationSpecSetRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteAnnotationSpecSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotationSpecSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotationSpecSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest.class, + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. AnnotationSpec resource name, format:
+   * `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. AnnotationSpec resource name, format:
+   * `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest other = + (com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for DeleteAnnotationSpecSet.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest) + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotationSpecSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotationSpecSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest.class, + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteAnnotationSpecSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest build() { + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest result = + new com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest other) { + if (other + == com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. AnnotationSpec resource name, format:
+     * `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. AnnotationSpec resource name, format:
+     * `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. AnnotationSpec resource name, format:
+     * `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. AnnotationSpec resource name, format:
+     * `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. AnnotationSpec resource name, format:
+     * `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest) + private static final com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAnnotationSpecSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteAnnotationSpecSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotationSpecSetRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotationSpecSetRequestOrBuilder.java new file mode 100644 index 000000000000..3fcfa268b65b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteAnnotationSpecSetRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface DeleteAnnotationSpecSetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. AnnotationSpec resource name, format:
+   * `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. AnnotationSpec resource name, format:
+   * `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteDatasetRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteDatasetRequest.java new file mode 100644 index 000000000000..557735df27d0 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteDatasetRequest.java @@ -0,0 +1,606 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for DeleteDataset.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.DeleteDatasetRequest} + */ +public final class DeleteDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.DeleteDatasetRequest) + DeleteDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDatasetRequest.newBuilder() to construct. + private DeleteDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDatasetRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest.class, + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest other = + (com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for DeleteDataset.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.DeleteDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.DeleteDatasetRequest) + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest.class, + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest build() { + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest result = + new com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.DeleteDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.DeleteDatasetRequest) + private static final com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteDatasetRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteDatasetRequestOrBuilder.java new file mode 100644 index 000000000000..f55ac60b2809 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteDatasetRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface DeleteDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.DeleteDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteInstructionRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteInstructionRequest.java new file mode 100644 index 000000000000..55012558d57e --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteInstructionRequest.java @@ -0,0 +1,612 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for DeleteInstruction.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.DeleteInstructionRequest} + */ +public final class DeleteInstructionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.DeleteInstructionRequest) + DeleteInstructionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteInstructionRequest.newBuilder() to construct. + private DeleteInstructionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteInstructionRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteInstructionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteInstructionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteInstructionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest.class, + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest other = + (com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for DeleteInstruction.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.DeleteInstructionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.DeleteInstructionRequest) + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteInstructionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteInstructionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest.class, + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_DeleteInstructionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest build() { + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest result = + new com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest other) { + if (other + == com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.DeleteInstructionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.DeleteInstructionRequest) + private static final com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteInstructionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteInstructionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteInstructionRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteInstructionRequestOrBuilder.java new file mode 100644 index 000000000000..79cdbfee357a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/DeleteInstructionRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface DeleteInstructionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.DeleteInstructionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/EventConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/EventConfig.java new file mode 100644 index 000000000000..4800df944bd4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/EventConfig.java @@ -0,0 +1,707 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Config for video event human labeling task.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.EventConfig} + */ +public final class EventConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.EventConfig) + EventConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use EventConfig.newBuilder() to construct. + private EventConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EventConfig() { + annotationSpecSets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EventConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotationSpecSets_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + annotationSpecSets_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + annotationSpecSets_ = annotationSpecSets_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_EventConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_EventConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.EventConfig.class, + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder.class); + } + + public static final int ANNOTATION_SPEC_SETS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList annotationSpecSets_; + /** + * + * + *
+   * Required. The list of annotation spec set resource name. Similar to video
+   * classification, we support selecting event from multiple AnnotationSpecSet
+   * at the same time.
+   * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public com.google.protobuf.ProtocolStringList getAnnotationSpecSetsList() { + return annotationSpecSets_; + } + /** + * + * + *
+   * Required. The list of annotation spec set resource name. Similar to video
+   * classification, we support selecting event from multiple AnnotationSpecSet
+   * at the same time.
+   * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public int getAnnotationSpecSetsCount() { + return annotationSpecSets_.size(); + } + /** + * + * + *
+   * Required. The list of annotation spec set resource name. Similar to video
+   * classification, we support selecting event from multiple AnnotationSpecSet
+   * at the same time.
+   * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public java.lang.String getAnnotationSpecSets(int index) { + return annotationSpecSets_.get(index); + } + /** + * + * + *
+   * Required. The list of annotation spec set resource name. Similar to video
+   * classification, we support selecting event from multiple AnnotationSpecSet
+   * at the same time.
+   * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetsBytes(int index) { + return annotationSpecSets_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < annotationSpecSets_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecSets_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < annotationSpecSets_.size(); i++) { + dataSize += computeStringSizeNoTag(annotationSpecSets_.getRaw(i)); + } + size += dataSize; + size += 1 * getAnnotationSpecSetsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.EventConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.EventConfig other = + (com.google.cloud.datalabeling.v1beta1.EventConfig) obj; + + if (!getAnnotationSpecSetsList().equals(other.getAnnotationSpecSetsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnnotationSpecSetsCount() > 0) { + hash = (37 * hash) + ANNOTATION_SPEC_SETS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSetsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.EventConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for video event human labeling task.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.EventConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.EventConfig) + com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_EventConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_EventConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.EventConfig.class, + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.EventConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + annotationSpecSets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_EventConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.EventConfig getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.EventConfig build() { + com.google.cloud.datalabeling.v1beta1.EventConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.EventConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.EventConfig result = + new com.google.cloud.datalabeling.v1beta1.EventConfig(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + annotationSpecSets_ = annotationSpecSets_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.annotationSpecSets_ = annotationSpecSets_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.EventConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.EventConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.EventConfig other) { + if (other == com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance()) + return this; + if (!other.annotationSpecSets_.isEmpty()) { + if (annotationSpecSets_.isEmpty()) { + annotationSpecSets_ = other.annotationSpecSets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.addAll(other.annotationSpecSets_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.EventConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.EventConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList annotationSpecSets_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAnnotationSpecSetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + annotationSpecSets_ = new com.google.protobuf.LazyStringArrayList(annotationSpecSets_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. The list of annotation spec set resource name. Similar to video
+     * classification, we support selecting event from multiple AnnotationSpecSet
+     * at the same time.
+     * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public com.google.protobuf.ProtocolStringList getAnnotationSpecSetsList() { + return annotationSpecSets_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. The list of annotation spec set resource name. Similar to video
+     * classification, we support selecting event from multiple AnnotationSpecSet
+     * at the same time.
+     * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public int getAnnotationSpecSetsCount() { + return annotationSpecSets_.size(); + } + /** + * + * + *
+     * Required. The list of annotation spec set resource name. Similar to video
+     * classification, we support selecting event from multiple AnnotationSpecSet
+     * at the same time.
+     * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public java.lang.String getAnnotationSpecSets(int index) { + return annotationSpecSets_.get(index); + } + /** + * + * + *
+     * Required. The list of annotation spec set resource name. Similar to video
+     * classification, we support selecting event from multiple AnnotationSpecSet
+     * at the same time.
+     * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetsBytes(int index) { + return annotationSpecSets_.getByteString(index); + } + /** + * + * + *
+     * Required. The list of annotation spec set resource name. Similar to video
+     * classification, we support selecting event from multiple AnnotationSpecSet
+     * at the same time.
+     * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public Builder setAnnotationSpecSets(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set resource name. Similar to video
+     * classification, we support selecting event from multiple AnnotationSpecSet
+     * at the same time.
+     * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public Builder addAnnotationSpecSets(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set resource name. Similar to video
+     * classification, we support selecting event from multiple AnnotationSpecSet
+     * at the same time.
+     * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public Builder addAllAnnotationSpecSets(java.lang.Iterable values) { + ensureAnnotationSpecSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationSpecSets_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set resource name. Similar to video
+     * classification, we support selecting event from multiple AnnotationSpecSet
+     * at the same time.
+     * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public Builder clearAnnotationSpecSets() { + annotationSpecSets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set resource name. Similar to video
+     * classification, we support selecting event from multiple AnnotationSpecSet
+     * at the same time.
+     * 
+ * + * repeated string annotation_spec_sets = 1; + */ + public Builder addAnnotationSpecSetsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.EventConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.EventConfig) + private static final com.google.cloud.datalabeling.v1beta1.EventConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.EventConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.EventConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EventConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EventConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.EventConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/EventConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/EventConfigOrBuilder.java new file mode 100644 index 000000000000..26cbd0f5add1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/EventConfigOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface EventConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.EventConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The list of annotation spec set resource name. Similar to video
+   * classification, we support selecting event from multiple AnnotationSpecSet
+   * at the same time.
+   * 
+ * + * repeated string annotation_spec_sets = 1; + */ + java.util.List getAnnotationSpecSetsList(); + /** + * + * + *
+   * Required. The list of annotation spec set resource name. Similar to video
+   * classification, we support selecting event from multiple AnnotationSpecSet
+   * at the same time.
+   * 
+ * + * repeated string annotation_spec_sets = 1; + */ + int getAnnotationSpecSetsCount(); + /** + * + * + *
+   * Required. The list of annotation spec set resource name. Similar to video
+   * classification, we support selecting event from multiple AnnotationSpecSet
+   * at the same time.
+   * 
+ * + * repeated string annotation_spec_sets = 1; + */ + java.lang.String getAnnotationSpecSets(int index); + /** + * + * + *
+   * Required. The list of annotation spec set resource name. Similar to video
+   * classification, we support selecting event from multiple AnnotationSpecSet
+   * at the same time.
+   * 
+ * + * repeated string annotation_spec_sets = 1; + */ + com.google.protobuf.ByteString getAnnotationSpecSetsBytes(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Example.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Example.java new file mode 100644 index 000000000000..01ee0045d00b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Example.java @@ -0,0 +1,2379 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * An Example is a piece of data and its annotation. For example, an image with
+ * label "house".
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Example} + */ +public final class Example extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.Example) + ExampleOrBuilder { + private static final long serialVersionUID = 0L; + // Use Example.newBuilder() to construct. + private Example(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Example() { + name_ = ""; + annotations_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Example( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder subBuilder = null; + if (payloadCase_ == 2) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_).toBuilder(); + } + payload_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ImagePayload.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_); + payload_ = subBuilder.buildPartial(); + } + payloadCase_ = 2; + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + annotations_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + annotations_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.Annotation.parser(), + extensionRegistry)); + break; + } + case 50: + { + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder subBuilder = null; + if (payloadCase_ == 6) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.TextPayload) payload_).toBuilder(); + } + payload_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.TextPayload.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datalabeling.v1beta1.TextPayload) payload_); + payload_ = subBuilder.buildPartial(); + } + payloadCase_ = 6; + break; + } + case 58: + { + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder subBuilder = null; + if (payloadCase_ == 7) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_).toBuilder(); + } + payload_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.VideoPayload.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_); + payload_ = subBuilder.buildPartial(); + } + payloadCase_ = 7; + break; + } + case 66: + { + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder subBuilder = null; + if (payloadCase_ == 8) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_).toBuilder(); + } + payload_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AudioPayload.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_); + payload_ = subBuilder.buildPartial(); + } + payloadCase_ = 8; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000020) != 0)) { + annotations_ = java.util.Collections.unmodifiableList(annotations_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Example_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Example_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Example.class, + com.google.cloud.datalabeling.v1beta1.Example.Builder.class); + } + + private int bitField0_; + private int payloadCase_ = 0; + private java.lang.Object payload_; + + public enum PayloadCase implements com.google.protobuf.Internal.EnumLite { + IMAGE_PAYLOAD(2), + TEXT_PAYLOAD(6), + VIDEO_PAYLOAD(7), + AUDIO_PAYLOAD(8), + PAYLOAD_NOT_SET(0); + private final int value; + + private PayloadCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static PayloadCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadCase forNumber(int value) { + switch (value) { + case 2: + return IMAGE_PAYLOAD; + case 6: + return TEXT_PAYLOAD; + case 7: + return VIDEO_PAYLOAD; + case 8: + return AUDIO_PAYLOAD; + case 0: + return PAYLOAD_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public static final int IMAGE_PAYLOAD_FIELD_NUMBER = 2; + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public boolean hasImagePayload() { + return payloadCase_ == 2; + } + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public com.google.cloud.datalabeling.v1beta1.ImagePayload getImagePayload() { + if (payloadCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder getImagePayloadOrBuilder() { + if (payloadCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } + + public static final int TEXT_PAYLOAD_FIELD_NUMBER = 6; + /** + * + * + *
+   * The text payload, a container of the text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + public boolean hasTextPayload() { + return payloadCase_ == 6; + } + /** + * + * + *
+   * The text payload, a container of the text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + public com.google.cloud.datalabeling.v1beta1.TextPayload getTextPayload() { + if (payloadCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } + /** + * + * + *
+   * The text payload, a container of the text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + public com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder getTextPayloadOrBuilder() { + if (payloadCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } + + public static final int VIDEO_PAYLOAD_FIELD_NUMBER = 7; + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + public boolean hasVideoPayload() { + return payloadCase_ == 7; + } + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + public com.google.cloud.datalabeling.v1beta1.VideoPayload getVideoPayload() { + if (payloadCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + public com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder getVideoPayloadOrBuilder() { + if (payloadCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } + + public static final int AUDIO_PAYLOAD_FIELD_NUMBER = 8; + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + public boolean hasAudioPayload() { + return payloadCase_ == 8; + } + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + public com.google.cloud.datalabeling.v1beta1.AudioPayload getAudioPayload() { + if (payloadCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + public com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder getAudioPayloadOrBuilder() { + if (payloadCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Name of the example, in format of:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}/examples/{example_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Name of the example, in format of:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}/examples/{example_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATIONS_FIELD_NUMBER = 5; + private java.util.List annotations_; + /** + * + * + *
+   * Output only. Annotations for the piece of data in Example.
+   * One piece of data can have multiple annotations.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public java.util.List getAnnotationsList() { + return annotations_; + } + /** + * + * + *
+   * Output only. Annotations for the piece of data in Example.
+   * One piece of data can have multiple annotations.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public java.util.List + getAnnotationsOrBuilderList() { + return annotations_; + } + /** + * + * + *
+   * Output only. Annotations for the piece of data in Example.
+   * One piece of data can have multiple annotations.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public int getAnnotationsCount() { + return annotations_.size(); + } + /** + * + * + *
+   * Output only. Annotations for the piece of data in Example.
+   * One piece of data can have multiple annotations.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public com.google.cloud.datalabeling.v1beta1.Annotation getAnnotations(int index) { + return annotations_.get(index); + } + /** + * + * + *
+   * Output only. Annotations for the piece of data in Example.
+   * One piece of data can have multiple annotations.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationOrBuilder getAnnotationsOrBuilder( + int index) { + return annotations_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (payloadCase_ == 2) { + output.writeMessage(2, (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_); + } + for (int i = 0; i < annotations_.size(); i++) { + output.writeMessage(5, annotations_.get(i)); + } + if (payloadCase_ == 6) { + output.writeMessage(6, (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_); + } + if (payloadCase_ == 7) { + output.writeMessage(7, (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_); + } + if (payloadCase_ == 8) { + output.writeMessage(8, (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (payloadCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_); + } + for (int i = 0; i < annotations_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, annotations_.get(i)); + } + if (payloadCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_); + } + if (payloadCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_); + } + if (payloadCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.Example)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.Example other = + (com.google.cloud.datalabeling.v1beta1.Example) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAnnotationsList().equals(other.getAnnotationsList())) return false; + if (!getPayloadCase().equals(other.getPayloadCase())) return false; + switch (payloadCase_) { + case 2: + if (!getImagePayload().equals(other.getImagePayload())) return false; + break; + case 6: + if (!getTextPayload().equals(other.getTextPayload())) return false; + break; + case 7: + if (!getVideoPayload().equals(other.getVideoPayload())) return false; + break; + case 8: + if (!getAudioPayload().equals(other.getAudioPayload())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getAnnotationsCount() > 0) { + hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationsList().hashCode(); + } + switch (payloadCase_) { + case 2: + hash = (37 * hash) + IMAGE_PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getImagePayload().hashCode(); + break; + case 6: + hash = (37 * hash) + TEXT_PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getTextPayload().hashCode(); + break; + case 7: + hash = (37 * hash) + VIDEO_PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getVideoPayload().hashCode(); + break; + case 8: + hash = (37 * hash) + AUDIO_PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getAudioPayload().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Example parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.Example prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An Example is a piece of data and its annotation. For example, an image with
+   * label "house".
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Example} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.Example) + com.google.cloud.datalabeling.v1beta1.ExampleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Example_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Example_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Example.class, + com.google.cloud.datalabeling.v1beta1.Example.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.Example.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + annotationsBuilder_.clear(); + } + payloadCase_ = 0; + payload_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Example_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Example getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.Example.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Example build() { + com.google.cloud.datalabeling.v1beta1.Example result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Example buildPartial() { + com.google.cloud.datalabeling.v1beta1.Example result = + new com.google.cloud.datalabeling.v1beta1.Example(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (payloadCase_ == 2) { + if (imagePayloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = imagePayloadBuilder_.build(); + } + } + if (payloadCase_ == 6) { + if (textPayloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = textPayloadBuilder_.build(); + } + } + if (payloadCase_ == 7) { + if (videoPayloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = videoPayloadBuilder_.build(); + } + } + if (payloadCase_ == 8) { + if (audioPayloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = audioPayloadBuilder_.build(); + } + } + result.name_ = name_; + if (annotationsBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + annotations_ = java.util.Collections.unmodifiableList(annotations_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.annotations_ = annotations_; + } else { + result.annotations_ = annotationsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + result.payloadCase_ = payloadCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.Example) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.Example) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.Example other) { + if (other == com.google.cloud.datalabeling.v1beta1.Example.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (annotationsBuilder_ == null) { + if (!other.annotations_.isEmpty()) { + if (annotations_.isEmpty()) { + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureAnnotationsIsMutable(); + annotations_.addAll(other.annotations_); + } + onChanged(); + } + } else { + if (!other.annotations_.isEmpty()) { + if (annotationsBuilder_.isEmpty()) { + annotationsBuilder_.dispose(); + annotationsBuilder_ = null; + annotations_ = other.annotations_; + bitField0_ = (bitField0_ & ~0x00000020); + annotationsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotationsFieldBuilder() + : null; + } else { + annotationsBuilder_.addAllMessages(other.annotations_); + } + } + } + switch (other.getPayloadCase()) { + case IMAGE_PAYLOAD: + { + mergeImagePayload(other.getImagePayload()); + break; + } + case TEXT_PAYLOAD: + { + mergeTextPayload(other.getTextPayload()); + break; + } + case VIDEO_PAYLOAD: + { + mergeVideoPayload(other.getVideoPayload()); + break; + } + case AUDIO_PAYLOAD: + { + mergeAudioPayload(other.getAudioPayload()); + break; + } + case PAYLOAD_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.Example parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datalabeling.v1beta1.Example) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int payloadCase_ = 0; + private java.lang.Object payload_; + + public PayloadCase getPayloadCase() { + return PayloadCase.forNumber(payloadCase_); + } + + public Builder clearPayload() { + payloadCase_ = 0; + payload_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImagePayload, + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder, + com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder> + imagePayloadBuilder_; + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public boolean hasImagePayload() { + return payloadCase_ == 2; + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public com.google.cloud.datalabeling.v1beta1.ImagePayload getImagePayload() { + if (imagePayloadBuilder_ == null) { + if (payloadCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } else { + if (payloadCase_ == 2) { + return imagePayloadBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public Builder setImagePayload(com.google.cloud.datalabeling.v1beta1.ImagePayload value) { + if (imagePayloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + imagePayloadBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public Builder setImagePayload( + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder builderForValue) { + if (imagePayloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + imagePayloadBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 2; + return this; + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public Builder mergeImagePayload(com.google.cloud.datalabeling.v1beta1.ImagePayload value) { + if (imagePayloadBuilder_ == null) { + if (payloadCase_ == 2 + && payload_ + != com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance()) { + payload_ = + com.google.cloud.datalabeling.v1beta1.ImagePayload.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 2) { + imagePayloadBuilder_.mergeFrom(value); + } + imagePayloadBuilder_.setMessage(value); + } + payloadCase_ = 2; + return this; + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public Builder clearImagePayload() { + if (imagePayloadBuilder_ == null) { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 2) { + payloadCase_ = 0; + payload_ = null; + } + imagePayloadBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder getImagePayloadBuilder() { + return getImagePayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + public com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder getImagePayloadOrBuilder() { + if ((payloadCase_ == 2) && (imagePayloadBuilder_ != null)) { + return imagePayloadBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The image payload, a container of the image bytes/uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImagePayload, + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder, + com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder> + getImagePayloadFieldBuilder() { + if (imagePayloadBuilder_ == null) { + if (!(payloadCase_ == 2)) { + payload_ = com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } + imagePayloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImagePayload, + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder, + com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ImagePayload) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 2; + onChanged(); + ; + return imagePayloadBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextPayload, + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder, + com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder> + textPayloadBuilder_; + /** + * + * + *
+     * The text payload, a container of the text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + public boolean hasTextPayload() { + return payloadCase_ == 6; + } + /** + * + * + *
+     * The text payload, a container of the text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + public com.google.cloud.datalabeling.v1beta1.TextPayload getTextPayload() { + if (textPayloadBuilder_ == null) { + if (payloadCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } else { + if (payloadCase_ == 6) { + return textPayloadBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The text payload, a container of the text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + public Builder setTextPayload(com.google.cloud.datalabeling.v1beta1.TextPayload value) { + if (textPayloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + textPayloadBuilder_.setMessage(value); + } + payloadCase_ = 6; + return this; + } + /** + * + * + *
+     * The text payload, a container of the text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + public Builder setTextPayload( + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder builderForValue) { + if (textPayloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + textPayloadBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 6; + return this; + } + /** + * + * + *
+     * The text payload, a container of the text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + public Builder mergeTextPayload(com.google.cloud.datalabeling.v1beta1.TextPayload value) { + if (textPayloadBuilder_ == null) { + if (payloadCase_ == 6 + && payload_ != com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance()) { + payload_ = + com.google.cloud.datalabeling.v1beta1.TextPayload.newBuilder( + (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 6) { + textPayloadBuilder_.mergeFrom(value); + } + textPayloadBuilder_.setMessage(value); + } + payloadCase_ = 6; + return this; + } + /** + * + * + *
+     * The text payload, a container of the text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + public Builder clearTextPayload() { + if (textPayloadBuilder_ == null) { + if (payloadCase_ == 6) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 6) { + payloadCase_ = 0; + payload_ = null; + } + textPayloadBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The text payload, a container of the text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + public com.google.cloud.datalabeling.v1beta1.TextPayload.Builder getTextPayloadBuilder() { + return getTextPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The text payload, a container of the text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + public com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder getTextPayloadOrBuilder() { + if ((payloadCase_ == 6) && (textPayloadBuilder_ != null)) { + return textPayloadBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The text payload, a container of the text content.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextPayload, + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder, + com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder> + getTextPayloadFieldBuilder() { + if (textPayloadBuilder_ == null) { + if (!(payloadCase_ == 6)) { + payload_ = com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } + textPayloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextPayload, + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder, + com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.TextPayload) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 6; + onChanged(); + ; + return textPayloadBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoPayload, + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder, + com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder> + videoPayloadBuilder_; + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + public boolean hasVideoPayload() { + return payloadCase_ == 7; + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + public com.google.cloud.datalabeling.v1beta1.VideoPayload getVideoPayload() { + if (videoPayloadBuilder_ == null) { + if (payloadCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } else { + if (payloadCase_ == 7) { + return videoPayloadBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + public Builder setVideoPayload(com.google.cloud.datalabeling.v1beta1.VideoPayload value) { + if (videoPayloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + videoPayloadBuilder_.setMessage(value); + } + payloadCase_ = 7; + return this; + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + public Builder setVideoPayload( + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder builderForValue) { + if (videoPayloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + videoPayloadBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 7; + return this; + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + public Builder mergeVideoPayload(com.google.cloud.datalabeling.v1beta1.VideoPayload value) { + if (videoPayloadBuilder_ == null) { + if (payloadCase_ == 7 + && payload_ + != com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance()) { + payload_ = + com.google.cloud.datalabeling.v1beta1.VideoPayload.newBuilder( + (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 7) { + videoPayloadBuilder_.mergeFrom(value); + } + videoPayloadBuilder_.setMessage(value); + } + payloadCase_ = 7; + return this; + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + public Builder clearVideoPayload() { + if (videoPayloadBuilder_ == null) { + if (payloadCase_ == 7) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 7) { + payloadCase_ = 0; + payload_ = null; + } + videoPayloadBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + public com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder getVideoPayloadBuilder() { + return getVideoPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + public com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder getVideoPayloadOrBuilder() { + if ((payloadCase_ == 7) && (videoPayloadBuilder_ != null)) { + return videoPayloadBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The video payload, a container of the video uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoPayload, + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder, + com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder> + getVideoPayloadFieldBuilder() { + if (videoPayloadBuilder_ == null) { + if (!(payloadCase_ == 7)) { + payload_ = com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } + videoPayloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoPayload, + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder, + com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.VideoPayload) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 7; + onChanged(); + ; + return videoPayloadBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AudioPayload, + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder, + com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder> + audioPayloadBuilder_; + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + public boolean hasAudioPayload() { + return payloadCase_ == 8; + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + public com.google.cloud.datalabeling.v1beta1.AudioPayload getAudioPayload() { + if (audioPayloadBuilder_ == null) { + if (payloadCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } else { + if (payloadCase_ == 8) { + return audioPayloadBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + public Builder setAudioPayload(com.google.cloud.datalabeling.v1beta1.AudioPayload value) { + if (audioPayloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + audioPayloadBuilder_.setMessage(value); + } + payloadCase_ = 8; + return this; + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + public Builder setAudioPayload( + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder builderForValue) { + if (audioPayloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + audioPayloadBuilder_.setMessage(builderForValue.build()); + } + payloadCase_ = 8; + return this; + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + public Builder mergeAudioPayload(com.google.cloud.datalabeling.v1beta1.AudioPayload value) { + if (audioPayloadBuilder_ == null) { + if (payloadCase_ == 8 + && payload_ + != com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance()) { + payload_ = + com.google.cloud.datalabeling.v1beta1.AudioPayload.newBuilder( + (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_) + .mergeFrom(value) + .buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + if (payloadCase_ == 8) { + audioPayloadBuilder_.mergeFrom(value); + } + audioPayloadBuilder_.setMessage(value); + } + payloadCase_ = 8; + return this; + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + public Builder clearAudioPayload() { + if (audioPayloadBuilder_ == null) { + if (payloadCase_ == 8) { + payloadCase_ = 0; + payload_ = null; + onChanged(); + } + } else { + if (payloadCase_ == 8) { + payloadCase_ = 0; + payload_ = null; + } + audioPayloadBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + public com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder getAudioPayloadBuilder() { + return getAudioPayloadFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + public com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder getAudioPayloadOrBuilder() { + if ((payloadCase_ == 8) && (audioPayloadBuilder_ != null)) { + return audioPayloadBuilder_.getMessageOrBuilder(); + } else { + if (payloadCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_; + } + return com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } + } + /** + * + * + *
+     * The audio payload, a container of the audio uri.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AudioPayload, + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder, + com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder> + getAudioPayloadFieldBuilder() { + if (audioPayloadBuilder_ == null) { + if (!(payloadCase_ == 8)) { + payload_ = com.google.cloud.datalabeling.v1beta1.AudioPayload.getDefaultInstance(); + } + audioPayloadBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AudioPayload, + com.google.cloud.datalabeling.v1beta1.AudioPayload.Builder, + com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.AudioPayload) payload_, + getParentForChildren(), + isClean()); + payload_ = null; + } + payloadCase_ = 8; + onChanged(); + ; + return audioPayloadBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Name of the example, in format of:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}/examples/{example_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Name of the example, in format of:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}/examples/{example_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Name of the example, in format of:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}/examples/{example_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the example, in format of:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}/examples/{example_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Name of the example, in format of:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}/examples/{example_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List annotations_ = + java.util.Collections.emptyList(); + + private void ensureAnnotationsIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + annotations_ = + new java.util.ArrayList(annotations_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Annotation, + com.google.cloud.datalabeling.v1beta1.Annotation.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationOrBuilder> + annotationsBuilder_; + + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public java.util.List getAnnotationsList() { + if (annotationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotations_); + } else { + return annotationsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public int getAnnotationsCount() { + if (annotationsBuilder_ == null) { + return annotations_.size(); + } else { + return annotationsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public com.google.cloud.datalabeling.v1beta1.Annotation getAnnotations(int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public Builder setAnnotations( + int index, com.google.cloud.datalabeling.v1beta1.Annotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.set(index, value); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public Builder setAnnotations( + int index, com.google.cloud.datalabeling.v1beta1.Annotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.set(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public Builder addAnnotations(com.google.cloud.datalabeling.v1beta1.Annotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(value); + onChanged(); + } else { + annotationsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public Builder addAnnotations( + int index, com.google.cloud.datalabeling.v1beta1.Annotation value) { + if (annotationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationsIsMutable(); + annotations_.add(index, value); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public Builder addAnnotations( + com.google.cloud.datalabeling.v1beta1.Annotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public Builder addAnnotations( + int index, com.google.cloud.datalabeling.v1beta1.Annotation.Builder builderForValue) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public Builder addAllAnnotations( + java.lang.Iterable values) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotations_); + onChanged(); + } else { + annotationsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public Builder clearAnnotations() { + if (annotationsBuilder_ == null) { + annotations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + annotationsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public Builder removeAnnotations(int index) { + if (annotationsBuilder_ == null) { + ensureAnnotationsIsMutable(); + annotations_.remove(index); + onChanged(); + } else { + annotationsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public com.google.cloud.datalabeling.v1beta1.Annotation.Builder getAnnotationsBuilder( + int index) { + return getAnnotationsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationOrBuilder getAnnotationsOrBuilder( + int index) { + if (annotationsBuilder_ == null) { + return annotations_.get(index); + } else { + return annotationsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public java.util.List + getAnnotationsOrBuilderList() { + if (annotationsBuilder_ != null) { + return annotationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotations_); + } + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public com.google.cloud.datalabeling.v1beta1.Annotation.Builder addAnnotationsBuilder() { + return getAnnotationsFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.Annotation.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public com.google.cloud.datalabeling.v1beta1.Annotation.Builder addAnnotationsBuilder( + int index) { + return getAnnotationsFieldBuilder() + .addBuilder(index, com.google.cloud.datalabeling.v1beta1.Annotation.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Annotations for the piece of data in Example.
+     * One piece of data can have multiple annotations.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + public java.util.List + getAnnotationsBuilderList() { + return getAnnotationsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Annotation, + com.google.cloud.datalabeling.v1beta1.Annotation.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationOrBuilder> + getAnnotationsFieldBuilder() { + if (annotationsBuilder_ == null) { + annotationsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Annotation, + com.google.cloud.datalabeling.v1beta1.Annotation.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationOrBuilder>( + annotations_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + annotations_ = null; + } + return annotationsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.Example) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.Example) + private static final com.google.cloud.datalabeling.v1beta1.Example DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.Example(); + } + + public static com.google.cloud.datalabeling.v1beta1.Example getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Example parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Example(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Example getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExampleName.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExampleName.java new file mode 100644 index 000000000000..269a41145238 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExampleName.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.datalabeling.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 ExampleName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String dataset; + private final String annotatedDataset; + private final String example; + + public String getProject() { + return project; + } + + public String getDataset() { + return dataset; + } + + public String getAnnotatedDataset() { + return annotatedDataset; + } + + public String getExample() { + return example; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private ExampleName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + annotatedDataset = Preconditions.checkNotNull(builder.getAnnotatedDataset()); + example = Preconditions.checkNotNull(builder.getExample()); + } + + public static ExampleName of( + String project, String dataset, String annotatedDataset, String example) { + return newBuilder() + .setProject(project) + .setDataset(dataset) + .setAnnotatedDataset(annotatedDataset) + .setExample(example) + .build(); + } + + public static String format( + String project, String dataset, String annotatedDataset, String example) { + return newBuilder() + .setProject(project) + .setDataset(dataset) + .setAnnotatedDataset(annotatedDataset) + .setExample(example) + .build() + .toString(); + } + + public static ExampleName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "ExampleName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("dataset"), + matchMap.get("annotated_dataset"), + matchMap.get("example")); + } + + 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 (ExampleName 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("dataset", dataset); + fieldMapBuilder.put("annotatedDataset", annotatedDataset); + fieldMapBuilder.put("example", example); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", + project, + "dataset", + dataset, + "annotated_dataset", + annotatedDataset, + "example", + example); + } + + /** Builder for ExampleName. */ + public static class Builder { + + private String project; + private String dataset; + private String annotatedDataset; + private String example; + + public String getProject() { + return project; + } + + public String getDataset() { + return dataset; + } + + public String getAnnotatedDataset() { + return annotatedDataset; + } + + public String getExample() { + return example; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setAnnotatedDataset(String annotatedDataset) { + this.annotatedDataset = annotatedDataset; + return this; + } + + public Builder setExample(String example) { + this.example = example; + return this; + } + + private Builder() {} + + private Builder(ExampleName exampleName) { + project = exampleName.project; + dataset = exampleName.dataset; + annotatedDataset = exampleName.annotatedDataset; + example = exampleName.example; + } + + public ExampleName build() { + return new ExampleName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ExampleName) { + ExampleName that = (ExampleName) o; + return (this.project.equals(that.project)) + && (this.dataset.equals(that.dataset)) + && (this.annotatedDataset.equals(that.annotatedDataset)) + && (this.example.equals(that.example)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= dataset.hashCode(); + h *= 1000003; + h ^= annotatedDataset.hashCode(); + h *= 1000003; + h ^= example.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExampleOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExampleOrBuilder.java new file mode 100644 index 000000000000..ccef71951f90 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExampleOrBuilder.java @@ -0,0 +1,218 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ExampleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.Example) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + boolean hasImagePayload(); + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + com.google.cloud.datalabeling.v1beta1.ImagePayload getImagePayload(); + /** + * + * + *
+   * The image payload, a container of the image bytes/uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ImagePayload image_payload = 2; + */ + com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder getImagePayloadOrBuilder(); + + /** + * + * + *
+   * The text payload, a container of the text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + boolean hasTextPayload(); + /** + * + * + *
+   * The text payload, a container of the text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + com.google.cloud.datalabeling.v1beta1.TextPayload getTextPayload(); + /** + * + * + *
+   * The text payload, a container of the text content.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TextPayload text_payload = 6; + */ + com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder getTextPayloadOrBuilder(); + + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + boolean hasVideoPayload(); + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + com.google.cloud.datalabeling.v1beta1.VideoPayload getVideoPayload(); + /** + * + * + *
+   * The video payload, a container of the video uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.VideoPayload video_payload = 7; + */ + com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder getVideoPayloadOrBuilder(); + + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + boolean hasAudioPayload(); + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + com.google.cloud.datalabeling.v1beta1.AudioPayload getAudioPayload(); + /** + * + * + *
+   * The audio payload, a container of the audio uri.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AudioPayload audio_payload = 8; + */ + com.google.cloud.datalabeling.v1beta1.AudioPayloadOrBuilder getAudioPayloadOrBuilder(); + + /** + * + * + *
+   * Output only. Name of the example, in format of:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}/examples/{example_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Name of the example, in format of:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}/examples/{example_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. Annotations for the piece of data in Example.
+   * One piece of data can have multiple annotations.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + java.util.List getAnnotationsList(); + /** + * + * + *
+   * Output only. Annotations for the piece of data in Example.
+   * One piece of data can have multiple annotations.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + com.google.cloud.datalabeling.v1beta1.Annotation getAnnotations(int index); + /** + * + * + *
+   * Output only. Annotations for the piece of data in Example.
+   * One piece of data can have multiple annotations.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + int getAnnotationsCount(); + /** + * + * + *
+   * Output only. Annotations for the piece of data in Example.
+   * One piece of data can have multiple annotations.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + java.util.List + getAnnotationsOrBuilderList(); + /** + * + * + *
+   * Output only. Annotations for the piece of data in Example.
+   * One piece of data can have multiple annotations.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Annotation annotations = 5; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationOrBuilder getAnnotationsOrBuilder(int index); + + public com.google.cloud.datalabeling.v1beta1.Example.PayloadCase getPayloadCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationMetadata.java new file mode 100644 index 000000000000..9f1fbd7ec271 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationMetadata.java @@ -0,0 +1,1145 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Metadata of an ExportData operation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata} + */ +public final class ExportDataOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata) + ExportDataOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDataOperationMetadata.newBuilder() to construct. + private ExportDataOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDataOperationMetadata() { + dataset_ = ""; + partialFailures_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDataOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + dataset_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + partialFailures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + partialFailures_.add( + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+   * Output only. The name of dataset to be exported.
+   * "projects/*/datasets/*/Datasets/*"
+   * 
+ * + * string dataset = 1; + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The name of dataset to be exported.
+   * "projects/*/datasets/*/Datasets/*"
+   * 
+ * + * string dataset = 1; + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTIAL_FAILURES_FIELD_NUMBER = 2; + private java.util.List partialFailures_; + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List + getPartialFailuresOrBuilderList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public int getPartialFailuresCount() { + return partialFailures_.size(); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status getPartialFailures(int index) { + return partialFailures_.get(index); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + return partialFailures_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + for (int i = 0; i < partialFailures_.size(); i++) { + output.writeMessage(2, partialFailures_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + for (int i = 0; i < partialFailures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, partialFailures_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (!getPartialFailuresList().equals(other.getPartialFailuresList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + if (getPartialFailuresCount() > 0) { + hash = (37 * hash) + PARTIAL_FAILURES_FIELD_NUMBER; + hash = (53 * hash) + getPartialFailuresList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata of an ExportData operation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata) + com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPartialFailuresFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dataset_ = ""; + + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + partialFailuresBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata buildPartial() { + com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.dataset_ = dataset_; + if (partialFailuresBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.partialFailures_ = partialFailures_; + } else { + result.partialFailures_ = partialFailuresBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata.getDefaultInstance()) + return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (partialFailuresBuilder_ == null) { + if (!other.partialFailures_.isEmpty()) { + if (partialFailures_.isEmpty()) { + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePartialFailuresIsMutable(); + partialFailures_.addAll(other.partialFailures_); + } + onChanged(); + } + } else { + if (!other.partialFailures_.isEmpty()) { + if (partialFailuresBuilder_.isEmpty()) { + partialFailuresBuilder_.dispose(); + partialFailuresBuilder_ = null; + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000002); + partialFailuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPartialFailuresFieldBuilder() + : null; + } else { + partialFailuresBuilder_.addAllMessages(other.partialFailures_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+     * Output only. The name of dataset to be exported.
+     * "projects/*/datasets/*/Datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The name of dataset to be exported.
+     * "projects/*/datasets/*/Datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The name of dataset to be exported.
+     * "projects/*/datasets/*/Datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of dataset to be exported.
+     * "projects/*/datasets/*/Datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The name of dataset to be exported.
+     * "projects/*/datasets/*/Datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.util.List partialFailures_ = + java.util.Collections.emptyList(); + + private void ensurePartialFailuresIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + partialFailures_ = new java.util.ArrayList(partialFailures_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + partialFailuresBuilder_; + + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresList() { + if (partialFailuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialFailures_); + } else { + return partialFailuresBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public int getPartialFailuresCount() { + if (partialFailuresBuilder_ == null) { + return partialFailures_.size(); + } else { + return partialFailuresBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status getPartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder setPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, value); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder setPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addAllPartialFailures( + java.lang.Iterable values) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialFailures_); + onChanged(); + } else { + partialFailuresBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder clearPartialFailures() { + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + partialFailuresBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder removePartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.remove(index); + onChanged(); + } else { + partialFailuresBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder getPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List + getPartialFailuresOrBuilderList() { + if (partialFailuresBuilder_ != null) { + return partialFailuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialFailures_); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder() { + return getPartialFailuresFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresBuilderList() { + return getPartialFailuresFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getPartialFailuresFieldBuilder() { + if (partialFailuresBuilder_ == null) { + partialFailuresBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + partialFailures_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + partialFailures_ = null; + } + return partialFailuresBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDataOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDataOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..378548f3a2e6 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationMetadataOrBuilder.java @@ -0,0 +1,94 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ExportDataOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The name of dataset to be exported.
+   * "projects/*/datasets/*/Datasets/*"
+   * 
+ * + * string dataset = 1; + */ + java.lang.String getDataset(); + /** + * + * + *
+   * Output only. The name of dataset to be exported.
+   * "projects/*/datasets/*/Datasets/*"
+   * 
+ * + * string dataset = 1; + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + java.util.List getPartialFailuresList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + com.google.rpc.Status getPartialFailures(int index); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + int getPartialFailuresCount(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + java.util.List getPartialFailuresOrBuilderList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationResponse.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationResponse.java new file mode 100644 index 000000000000..882b732a3923 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationResponse.java @@ -0,0 +1,1308 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Response used for ExportDataset longrunning operation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ExportDataOperationResponse} + */ +public final class ExportDataOperationResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ExportDataOperationResponse) + ExportDataOperationResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDataOperationResponse.newBuilder() to construct. + private ExportDataOperationResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDataOperationResponse() { + dataset_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDataOperationResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + dataset_ = s; + break; + } + case 16: + { + totalCount_ = input.readInt32(); + break; + } + case 24: + { + exportCount_ = input.readInt32(); + break; + } + case 34: + { + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder subBuilder = null; + if (labelStats_ != null) { + subBuilder = labelStats_.toBuilder(); + } + labelStats_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.LabelStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(labelStats_); + labelStats_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.OutputConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse.class, + com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+   * Ouptut only. The name of dataset.
+   * "projects/*/datasets/*/Datasets/*"
+   * 
+ * + * string dataset = 1; + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+   * Ouptut only. The name of dataset.
+   * "projects/*/datasets/*/Datasets/*"
+   * 
+ * + * string dataset = 1; + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_COUNT_FIELD_NUMBER = 2; + private int totalCount_; + /** + * + * + *
+   * Output only. Total number of examples requested to export
+   * 
+ * + * int32 total_count = 2; + */ + public int getTotalCount() { + return totalCount_; + } + + public static final int EXPORT_COUNT_FIELD_NUMBER = 3; + private int exportCount_; + /** + * + * + *
+   * Output only. Number of examples exported successfully.
+   * 
+ * + * int32 export_count = 3; + */ + public int getExportCount() { + return exportCount_; + } + + public static final int LABEL_STATS_FIELD_NUMBER = 4; + private com.google.cloud.datalabeling.v1beta1.LabelStats labelStats_; + /** + * + * + *
+   * Output only. Statistic infos of labels in the exported dataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + public boolean hasLabelStats() { + return labelStats_ != null; + } + /** + * + * + *
+   * Output only. Statistic infos of labels in the exported dataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + public com.google.cloud.datalabeling.v1beta1.LabelStats getLabelStats() { + return labelStats_ == null + ? com.google.cloud.datalabeling.v1beta1.LabelStats.getDefaultInstance() + : labelStats_; + } + /** + * + * + *
+   * Output only. Statistic infos of labels in the exported dataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + public com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder getLabelStatsOrBuilder() { + return getLabelStats(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 5; + private com.google.cloud.datalabeling.v1beta1.OutputConfig outputConfig_; + /** + * + * + *
+   * Output only. output_config in the ExportData request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + * + * + *
+   * Output only. output_config in the ExportData request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.OutputConfig.getDefaultInstance() + : outputConfig_; + } + /** + * + * + *
+   * Output only. output_config in the ExportData request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (totalCount_ != 0) { + output.writeInt32(2, totalCount_); + } + if (exportCount_ != 0) { + output.writeInt32(3, exportCount_); + } + if (labelStats_ != null) { + output.writeMessage(4, getLabelStats()); + } + if (outputConfig_ != null) { + output.writeMessage(5, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (totalCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, totalCount_); + } + if (exportCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, exportCount_); + } + if (labelStats_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getLabelStats()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse other = + (com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (getTotalCount() != other.getTotalCount()) return false; + if (getExportCount() != other.getExportCount()) return false; + if (hasLabelStats() != other.hasLabelStats()) return false; + if (hasLabelStats()) { + if (!getLabelStats().equals(other.getLabelStats())) return false; + } + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig().equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + TOTAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTotalCount(); + hash = (37 * hash) + EXPORT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getExportCount(); + if (hasLabelStats()) { + hash = (37 * hash) + LABEL_STATS_FIELD_NUMBER; + hash = (53 * hash) + getLabelStats().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response used for ExportDataset longrunning operation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ExportDataOperationResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ExportDataOperationResponse) + com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse.class, + com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dataset_ = ""; + + totalCount_ = 0; + + exportCount_ = 0; + + if (labelStatsBuilder_ == null) { + labelStats_ = null; + } else { + labelStats_ = null; + labelStatsBuilder_ = null; + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse build() { + com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse buildPartial() { + com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse result = + new com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse(this); + result.dataset_ = dataset_; + result.totalCount_ = totalCount_; + result.exportCount_ = exportCount_; + if (labelStatsBuilder_ == null) { + result.labelStats_ = labelStats_; + } else { + result.labelStats_ = labelStatsBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse.getDefaultInstance()) + return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (other.getTotalCount() != 0) { + setTotalCount(other.getTotalCount()); + } + if (other.getExportCount() != 0) { + setExportCount(other.getExportCount()); + } + if (other.hasLabelStats()) { + mergeLabelStats(other.getLabelStats()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+     * Ouptut only. The name of dataset.
+     * "projects/*/datasets/*/Datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Ouptut only. The name of dataset.
+     * "projects/*/datasets/*/Datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Ouptut only. The name of dataset.
+     * "projects/*/datasets/*/Datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Ouptut only. The name of dataset.
+     * "projects/*/datasets/*/Datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + * + * + *
+     * Ouptut only. The name of dataset.
+     * "projects/*/datasets/*/Datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private int totalCount_; + /** + * + * + *
+     * Output only. Total number of examples requested to export
+     * 
+ * + * int32 total_count = 2; + */ + public int getTotalCount() { + return totalCount_; + } + /** + * + * + *
+     * Output only. Total number of examples requested to export
+     * 
+ * + * int32 total_count = 2; + */ + public Builder setTotalCount(int value) { + + totalCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Total number of examples requested to export
+     * 
+ * + * int32 total_count = 2; + */ + public Builder clearTotalCount() { + + totalCount_ = 0; + onChanged(); + return this; + } + + private int exportCount_; + /** + * + * + *
+     * Output only. Number of examples exported successfully.
+     * 
+ * + * int32 export_count = 3; + */ + public int getExportCount() { + return exportCount_; + } + /** + * + * + *
+     * Output only. Number of examples exported successfully.
+     * 
+ * + * int32 export_count = 3; + */ + public Builder setExportCount(int value) { + + exportCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of examples exported successfully.
+     * 
+ * + * int32 export_count = 3; + */ + public Builder clearExportCount() { + + exportCount_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.LabelStats labelStats_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelStats, + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder, + com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder> + labelStatsBuilder_; + /** + * + * + *
+     * Output only. Statistic infos of labels in the exported dataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + public boolean hasLabelStats() { + return labelStatsBuilder_ != null || labelStats_ != null; + } + /** + * + * + *
+     * Output only. Statistic infos of labels in the exported dataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + public com.google.cloud.datalabeling.v1beta1.LabelStats getLabelStats() { + if (labelStatsBuilder_ == null) { + return labelStats_ == null + ? com.google.cloud.datalabeling.v1beta1.LabelStats.getDefaultInstance() + : labelStats_; + } else { + return labelStatsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Statistic infos of labels in the exported dataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + public Builder setLabelStats(com.google.cloud.datalabeling.v1beta1.LabelStats value) { + if (labelStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + labelStats_ = value; + onChanged(); + } else { + labelStatsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Statistic infos of labels in the exported dataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + public Builder setLabelStats( + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder builderForValue) { + if (labelStatsBuilder_ == null) { + labelStats_ = builderForValue.build(); + onChanged(); + } else { + labelStatsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Statistic infos of labels in the exported dataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + public Builder mergeLabelStats(com.google.cloud.datalabeling.v1beta1.LabelStats value) { + if (labelStatsBuilder_ == null) { + if (labelStats_ != null) { + labelStats_ = + com.google.cloud.datalabeling.v1beta1.LabelStats.newBuilder(labelStats_) + .mergeFrom(value) + .buildPartial(); + } else { + labelStats_ = value; + } + onChanged(); + } else { + labelStatsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Statistic infos of labels in the exported dataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + public Builder clearLabelStats() { + if (labelStatsBuilder_ == null) { + labelStats_ = null; + onChanged(); + } else { + labelStats_ = null; + labelStatsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Statistic infos of labels in the exported dataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + public com.google.cloud.datalabeling.v1beta1.LabelStats.Builder getLabelStatsBuilder() { + + onChanged(); + return getLabelStatsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Statistic infos of labels in the exported dataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + public com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder getLabelStatsOrBuilder() { + if (labelStatsBuilder_ != null) { + return labelStatsBuilder_.getMessageOrBuilder(); + } else { + return labelStats_ == null + ? com.google.cloud.datalabeling.v1beta1.LabelStats.getDefaultInstance() + : labelStats_; + } + } + /** + * + * + *
+     * Output only. Statistic infos of labels in the exported dataset.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelStats, + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder, + com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder> + getLabelStatsFieldBuilder() { + if (labelStatsBuilder_ == null) { + labelStatsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelStats, + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder, + com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder>( + getLabelStats(), getParentForChildren(), isClean()); + labelStats_ = null; + } + return labelStatsBuilder_; + } + + private com.google.cloud.datalabeling.v1beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.OutputConfig, + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder> + outputConfigBuilder_; + /** + * + * + *
+     * Output only. output_config in the ExportData request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + * + * + *
+     * Output only. output_config in the ExportData request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.OutputConfig.getDefaultInstance() + : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. output_config in the ExportData request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + public Builder setOutputConfig(com.google.cloud.datalabeling.v1beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. output_config in the ExportData request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + public Builder setOutputConfig( + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. output_config in the ExportData request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + public Builder mergeOutputConfig(com.google.cloud.datalabeling.v1beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.datalabeling.v1beta1.OutputConfig.newBuilder(outputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. output_config in the ExportData request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. output_config in the ExportData request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. output_config in the ExportData request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.OutputConfig.getDefaultInstance() + : outputConfig_; + } + } + /** + * + * + *
+     * Output only. output_config in the ExportData request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.OutputConfig, + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.OutputConfig, + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder>( + getOutputConfig(), getParentForChildren(), isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ExportDataOperationResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ExportDataOperationResponse) + private static final com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse(); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDataOperationResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDataOperationResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationResponseOrBuilder.java new file mode 100644 index 000000000000..4ac390d38bd9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataOperationResponseOrBuilder.java @@ -0,0 +1,117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ExportDataOperationResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ExportDataOperationResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Ouptut only. The name of dataset.
+   * "projects/*/datasets/*/Datasets/*"
+   * 
+ * + * string dataset = 1; + */ + java.lang.String getDataset(); + /** + * + * + *
+   * Ouptut only. The name of dataset.
+   * "projects/*/datasets/*/Datasets/*"
+   * 
+ * + * string dataset = 1; + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+   * Output only. Total number of examples requested to export
+   * 
+ * + * int32 total_count = 2; + */ + int getTotalCount(); + + /** + * + * + *
+   * Output only. Number of examples exported successfully.
+   * 
+ * + * int32 export_count = 3; + */ + int getExportCount(); + + /** + * + * + *
+   * Output only. Statistic infos of labels in the exported dataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + boolean hasLabelStats(); + /** + * + * + *
+   * Output only. Statistic infos of labels in the exported dataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + com.google.cloud.datalabeling.v1beta1.LabelStats getLabelStats(); + /** + * + * + *
+   * Output only. Statistic infos of labels in the exported dataset.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelStats label_stats = 4; + */ + com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder getLabelStatsOrBuilder(); + + /** + * + * + *
+   * Output only. output_config in the ExportData request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + boolean hasOutputConfig(); + /** + * + * + *
+   * Output only. output_config in the ExportData request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + com.google.cloud.datalabeling.v1beta1.OutputConfig getOutputConfig(); + /** + * + * + *
+   * Output only. output_config in the ExportData request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 5; + */ + com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataRequest.java new file mode 100644 index 000000000000..95726a98a434 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataRequest.java @@ -0,0 +1,1224 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for ExportData API.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ExportDataRequest} + */ +public final class ExportDataRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ExportDataRequest) + ExportDataRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportDataRequest.newBuilder() to construct. + private ExportDataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportDataRequest() { + name_ = ""; + annotatedDataset_ = ""; + filter_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportDataRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotatedDataset_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 34: + { + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.OutputConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ExportDataRequest.class, + com.google.cloud.datalabeling.v1beta1.ExportDataRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATED_DATASET_FIELD_NUMBER = 2; + private volatile java.lang.Object annotatedDataset_; + /** + * + * + *
+   * Required. Annotated dataset resource name. DataItem in
+   * Dataset and their annotations in specified annotated dataset will be
+   * exported. It's in format of
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string annotated_dataset = 2; + */ + public java.lang.String getAnnotatedDataset() { + java.lang.Object ref = annotatedDataset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotatedDataset_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Annotated dataset resource name. DataItem in
+   * Dataset and their annotations in specified annotated dataset will be
+   * exported. It's in format of
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string annotated_dataset = 2; + */ + public com.google.protobuf.ByteString getAnnotatedDatasetBytes() { + java.lang.Object ref = annotatedDataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 3; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 3; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 3; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4; + private com.google.cloud.datalabeling.v1beta1.OutputConfig outputConfig_; + /** + * + * + *
+   * Required. Specify the output destination.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + * + * + *
+   * Required. Specify the output destination.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + public com.google.cloud.datalabeling.v1beta1.OutputConfig getOutputConfig() { + return outputConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.OutputConfig.getDefaultInstance() + : outputConfig_; + } + /** + * + * + *
+   * Required. Specify the output destination.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + public com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getAnnotatedDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, annotatedDataset_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); + } + if (outputConfig_ != null) { + output.writeMessage(4, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getAnnotatedDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, annotatedDataset_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOutputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ExportDataRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ExportDataRequest other = + (com.google.cloud.datalabeling.v1beta1.ExportDataRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAnnotatedDataset().equals(other.getAnnotatedDataset())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig().equals(other.getOutputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ANNOTATED_DATASET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotatedDataset().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ExportDataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ExportData API.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ExportDataRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ExportDataRequest) + com.google.cloud.datalabeling.v1beta1.ExportDataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ExportDataRequest.class, + com.google.cloud.datalabeling.v1beta1.ExportDataRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ExportDataRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + annotatedDataset_ = ""; + + filter_ = ""; + + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ExportDataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ExportDataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataRequest build() { + com.google.cloud.datalabeling.v1beta1.ExportDataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.ExportDataRequest result = + new com.google.cloud.datalabeling.v1beta1.ExportDataRequest(this); + result.name_ = name_; + result.annotatedDataset_ = annotatedDataset_; + result.filter_ = filter_; + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ExportDataRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ExportDataRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ExportDataRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.ExportDataRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getAnnotatedDataset().isEmpty()) { + annotatedDataset_ = other.annotatedDataset_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ExportDataRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ExportDataRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object annotatedDataset_ = ""; + /** + * + * + *
+     * Required. Annotated dataset resource name. DataItem in
+     * Dataset and their annotations in specified annotated dataset will be
+     * exported. It's in format of
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string annotated_dataset = 2; + */ + public java.lang.String getAnnotatedDataset() { + java.lang.Object ref = annotatedDataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotatedDataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Annotated dataset resource name. DataItem in
+     * Dataset and their annotations in specified annotated dataset will be
+     * exported. It's in format of
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string annotated_dataset = 2; + */ + public com.google.protobuf.ByteString getAnnotatedDatasetBytes() { + java.lang.Object ref = annotatedDataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Annotated dataset resource name. DataItem in
+     * Dataset and their annotations in specified annotated dataset will be
+     * exported. It's in format of
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string annotated_dataset = 2; + */ + public Builder setAnnotatedDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotatedDataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotated dataset resource name. DataItem in
+     * Dataset and their annotations in specified annotated dataset will be
+     * exported. It's in format of
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string annotated_dataset = 2; + */ + public Builder clearAnnotatedDataset() { + + annotatedDataset_ = getDefaultInstance().getAnnotatedDataset(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotated dataset resource name. DataItem in
+     * Dataset and their annotations in specified annotated dataset will be
+     * exported. It's in format of
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string annotated_dataset = 2; + */ + public Builder setAnnotatedDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotatedDataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 3; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 3; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 3; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 3; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 3; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.OutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.OutputConfig, + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder> + outputConfigBuilder_; + /** + * + * + *
+     * Required. Specify the output destination.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + * + * + *
+     * Required. Specify the output destination.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + public com.google.cloud.datalabeling.v1beta1.OutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.OutputConfig.getDefaultInstance() + : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Specify the output destination.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + public Builder setOutputConfig(com.google.cloud.datalabeling.v1beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Specify the output destination.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + public Builder setOutputConfig( + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Specify the output destination.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + public Builder mergeOutputConfig(com.google.cloud.datalabeling.v1beta1.OutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.datalabeling.v1beta1.OutputConfig.newBuilder(outputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Specify the output destination.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Specify the output destination.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + public com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Specify the output destination.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + public com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.OutputConfig.getDefaultInstance() + : outputConfig_; + } + } + /** + * + * + *
+     * Required. Specify the output destination.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.OutputConfig, + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.OutputConfig, + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder>( + getOutputConfig(), getParentForChildren(), isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ExportDataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ExportDataRequest) + private static final com.google.cloud.datalabeling.v1beta1.ExportDataRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ExportDataRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.ExportDataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportDataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportDataRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ExportDataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataRequestOrBuilder.java new file mode 100644 index 000000000000..b4c1daf659c4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ExportDataRequestOrBuilder.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ExportDataRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ExportDataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Annotated dataset resource name. DataItem in
+   * Dataset and their annotations in specified annotated dataset will be
+   * exported. It's in format of
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string annotated_dataset = 2; + */ + java.lang.String getAnnotatedDataset(); + /** + * + * + *
+   * Required. Annotated dataset resource name. DataItem in
+   * Dataset and their annotations in specified annotated dataset will be
+   * exported. It's in format of
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string annotated_dataset = 2; + */ + com.google.protobuf.ByteString getAnnotatedDatasetBytes(); + + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 3; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 3; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Required. Specify the output destination.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + boolean hasOutputConfig(); + /** + * + * + *
+   * Required. Specify the output destination.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + com.google.cloud.datalabeling.v1beta1.OutputConfig getOutputConfig(); + /** + * + * + *
+   * Required. Specify the output destination.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.OutputConfig output_config = 4; + */ + com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsDestination.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsDestination.java new file mode 100644 index 000000000000..99b883ed3483 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsDestination.java @@ -0,0 +1,775 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Export destination of the data.Only gcs path is allowed in
+ * output_uri.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GcsDestination} + */ +public final class GcsDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.GcsDestination) + GcsDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsDestination() { + outputUri_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + outputUri_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GcsDestination.class, + com.google.cloud.datalabeling.v1beta1.GcsDestination.Builder.class); + } + + public static final int OUTPUT_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object outputUri_; + /** + * + * + *
+   * Required. The output uri of destination file.
+   * 
+ * + * string output_uri = 1; + */ + public java.lang.String getOutputUri() { + java.lang.Object ref = outputUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The output uri of destination file.
+   * 
+ * + * string output_uri = 1; + */ + public com.google.protobuf.ByteString getOutputUriBytes() { + java.lang.Object ref = outputUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIME_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object mimeType_; + /** + * + * + *
+   * Required. The format of the gcs destination. Only "text/csv" and
+   * "application/json"
+   * are supported.
+   * 
+ * + * string mime_type = 2; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The format of the gcs destination. Only "text/csv" and
+   * "application/json"
+   * are supported.
+   * 
+ * + * string mime_type = 2; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getOutputUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputUri_); + } + if (!getMimeTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOutputUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputUri_); + } + if (!getMimeTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.GcsDestination other = + (com.google.cloud.datalabeling.v1beta1.GcsDestination) obj; + + if (!getOutputUri().equals(other.getOutputUri())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OUTPUT_URI_FIELD_NUMBER; + hash = (53 * hash) + getOutputUri().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.GcsDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Export destination of the data.Only gcs path is allowed in
+   * output_uri.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GcsDestination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.GcsDestination) + com.google.cloud.datalabeling.v1beta1.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GcsDestination.class, + com.google.cloud.datalabeling.v1beta1.GcsDestination.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.GcsDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + outputUri_ = ""; + + mimeType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsDestination getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.GcsDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsDestination build() { + com.google.cloud.datalabeling.v1beta1.GcsDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsDestination buildPartial() { + com.google.cloud.datalabeling.v1beta1.GcsDestination result = + new com.google.cloud.datalabeling.v1beta1.GcsDestination(this); + result.outputUri_ = outputUri_; + result.mimeType_ = mimeType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.GcsDestination) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.GcsDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.GcsDestination other) { + if (other == com.google.cloud.datalabeling.v1beta1.GcsDestination.getDefaultInstance()) + return this; + if (!other.getOutputUri().isEmpty()) { + outputUri_ = other.outputUri_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.GcsDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object outputUri_ = ""; + /** + * + * + *
+     * Required. The output uri of destination file.
+     * 
+ * + * string output_uri = 1; + */ + public java.lang.String getOutputUri() { + java.lang.Object ref = outputUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The output uri of destination file.
+     * 
+ * + * string output_uri = 1; + */ + public com.google.protobuf.ByteString getOutputUriBytes() { + java.lang.Object ref = outputUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The output uri of destination file.
+     * 
+ * + * string output_uri = 1; + */ + public Builder setOutputUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The output uri of destination file.
+     * 
+ * + * string output_uri = 1; + */ + public Builder clearOutputUri() { + + outputUri_ = getDefaultInstance().getOutputUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The output uri of destination file.
+     * 
+ * + * string output_uri = 1; + */ + public Builder setOutputUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object mimeType_ = ""; + /** + * + * + *
+     * Required. The format of the gcs destination. Only "text/csv" and
+     * "application/json"
+     * are supported.
+     * 
+ * + * string mime_type = 2; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The format of the gcs destination. Only "text/csv" and
+     * "application/json"
+     * are supported.
+     * 
+ * + * string mime_type = 2; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The format of the gcs destination. Only "text/csv" and
+     * "application/json"
+     * are supported.
+     * 
+ * + * string mime_type = 2; + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The format of the gcs destination. Only "text/csv" and
+     * "application/json"
+     * are supported.
+     * 
+ * + * string mime_type = 2; + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The format of the gcs destination. Only "text/csv" and
+     * "application/json"
+     * are supported.
+     * 
+ * + * string mime_type = 2; + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.GcsDestination) + private static final com.google.cloud.datalabeling.v1beta1.GcsDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.GcsDestination(); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsDestinationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsDestinationOrBuilder.java new file mode 100644 index 000000000000..c3b2696ba89b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsDestinationOrBuilder.java @@ -0,0 +1,56 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface GcsDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The output uri of destination file.
+   * 
+ * + * string output_uri = 1; + */ + java.lang.String getOutputUri(); + /** + * + * + *
+   * Required. The output uri of destination file.
+   * 
+ * + * string output_uri = 1; + */ + com.google.protobuf.ByteString getOutputUriBytes(); + + /** + * + * + *
+   * Required. The format of the gcs destination. Only "text/csv" and
+   * "application/json"
+   * are supported.
+   * 
+ * + * string mime_type = 2; + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * Required. The format of the gcs destination. Only "text/csv" and
+   * "application/json"
+   * are supported.
+   * 
+ * + * string mime_type = 2; + */ + com.google.protobuf.ByteString getMimeTypeBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsFolderDestination.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsFolderDestination.java new file mode 100644 index 000000000000..6a9fdc6cfbcc --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsFolderDestination.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Export folder destination of the data.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GcsFolderDestination} + */ +public final class GcsFolderDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.GcsFolderDestination) + GcsFolderDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsFolderDestination.newBuilder() to construct. + private GcsFolderDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsFolderDestination() { + outputFolderUri_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsFolderDestination( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + outputFolderUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsFolderDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsFolderDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.class, + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.Builder.class); + } + + public static final int OUTPUT_FOLDER_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object outputFolderUri_; + /** + * + * + *
+   * Required. GCS folder to export data to.
+   * 
+ * + * string output_folder_uri = 1; + */ + public java.lang.String getOutputFolderUri() { + java.lang.Object ref = outputFolderUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputFolderUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. GCS folder to export data to.
+   * 
+ * + * string output_folder_uri = 1; + */ + public com.google.protobuf.ByteString getOutputFolderUriBytes() { + java.lang.Object ref = outputFolderUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputFolderUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getOutputFolderUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputFolderUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOutputFolderUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputFolderUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.GcsFolderDestination)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination other = + (com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) obj; + + if (!getOutputFolderUri().equals(other.getOutputFolderUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OUTPUT_FOLDER_URI_FIELD_NUMBER; + hash = (53 * hash) + getOutputFolderUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Export folder destination of the data.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GcsFolderDestination} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.GcsFolderDestination) + com.google.cloud.datalabeling.v1beta1.GcsFolderDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsFolderDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsFolderDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.class, + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + outputFolderUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsFolderDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsFolderDestination getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsFolderDestination build() { + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsFolderDestination buildPartial() { + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination result = + new com.google.cloud.datalabeling.v1beta1.GcsFolderDestination(this); + result.outputFolderUri_ = outputFolderUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.GcsFolderDestination other) { + if (other == com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.getDefaultInstance()) + return this; + if (!other.getOutputFolderUri().isEmpty()) { + outputFolderUri_ = other.outputFolderUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object outputFolderUri_ = ""; + /** + * + * + *
+     * Required. GCS folder to export data to.
+     * 
+ * + * string output_folder_uri = 1; + */ + public java.lang.String getOutputFolderUri() { + java.lang.Object ref = outputFolderUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + outputFolderUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. GCS folder to export data to.
+     * 
+ * + * string output_folder_uri = 1; + */ + public com.google.protobuf.ByteString getOutputFolderUriBytes() { + java.lang.Object ref = outputFolderUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + outputFolderUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. GCS folder to export data to.
+     * 
+ * + * string output_folder_uri = 1; + */ + public Builder setOutputFolderUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + outputFolderUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. GCS folder to export data to.
+     * 
+ * + * string output_folder_uri = 1; + */ + public Builder clearOutputFolderUri() { + + outputFolderUri_ = getDefaultInstance().getOutputFolderUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. GCS folder to export data to.
+     * 
+ * + * string output_folder_uri = 1; + */ + public Builder setOutputFolderUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + outputFolderUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.GcsFolderDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.GcsFolderDestination) + private static final com.google.cloud.datalabeling.v1beta1.GcsFolderDestination DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.GcsFolderDestination(); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsFolderDestination getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsFolderDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsFolderDestination(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsFolderDestination getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsFolderDestinationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsFolderDestinationOrBuilder.java new file mode 100644 index 000000000000..30345b03df84 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsFolderDestinationOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface GcsFolderDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.GcsFolderDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. GCS folder to export data to.
+   * 
+ * + * string output_folder_uri = 1; + */ + java.lang.String getOutputFolderUri(); + /** + * + * + *
+   * Required. GCS folder to export data to.
+   * 
+ * + * string output_folder_uri = 1; + */ + com.google.protobuf.ByteString getOutputFolderUriBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsSource.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsSource.java new file mode 100644 index 000000000000..fd35e6b7e464 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsSource.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Source of the GCS file to be imported. Only gcs path is allowed in
+ * input_uri.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GcsSource} + */ +public final class GcsSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.GcsSource) + GcsSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsSource.newBuilder() to construct. + private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsSource() { + inputUri_ = ""; + mimeType_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + inputUri_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GcsSource.class, + com.google.cloud.datalabeling.v1beta1.GcsSource.Builder.class); + } + + public static final int INPUT_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object inputUri_; + /** + * + * + *
+   * Required. The input uri of source file.
+   * 
+ * + * string input_uri = 1; + */ + public java.lang.String getInputUri() { + java.lang.Object ref = inputUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputUri_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The input uri of source file.
+   * 
+ * + * string input_uri = 1; + */ + public com.google.protobuf.ByteString getInputUriBytes() { + java.lang.Object ref = inputUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIME_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object mimeType_; + /** + * + * + *
+   * Required. The format of the gcs source. Only "text/csv" is supported.
+   * 
+ * + * string mime_type = 2; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The format of the gcs source. Only "text/csv" is supported.
+   * 
+ * + * string mime_type = 2; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getInputUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUri_); + } + if (!getMimeTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getInputUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputUri_); + } + if (!getMimeTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.GcsSource)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.GcsSource other = + (com.google.cloud.datalabeling.v1beta1.GcsSource) obj; + + if (!getInputUri().equals(other.getInputUri())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INPUT_URI_FIELD_NUMBER; + hash = (53 * hash) + getInputUri().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.GcsSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Source of the GCS file to be imported. Only gcs path is allowed in
+   * input_uri.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GcsSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.GcsSource) + com.google.cloud.datalabeling.v1beta1.GcsSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GcsSource.class, + com.google.cloud.datalabeling.v1beta1.GcsSource.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.GcsSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + inputUri_ = ""; + + mimeType_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GcsSource_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsSource getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.GcsSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsSource build() { + com.google.cloud.datalabeling.v1beta1.GcsSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsSource buildPartial() { + com.google.cloud.datalabeling.v1beta1.GcsSource result = + new com.google.cloud.datalabeling.v1beta1.GcsSource(this); + result.inputUri_ = inputUri_; + result.mimeType_ = mimeType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.GcsSource) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.GcsSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.GcsSource other) { + if (other == com.google.cloud.datalabeling.v1beta1.GcsSource.getDefaultInstance()) + return this; + if (!other.getInputUri().isEmpty()) { + inputUri_ = other.inputUri_; + onChanged(); + } + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.GcsSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datalabeling.v1beta1.GcsSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object inputUri_ = ""; + /** + * + * + *
+     * Required. The input uri of source file.
+     * 
+ * + * string input_uri = 1; + */ + public java.lang.String getInputUri() { + java.lang.Object ref = inputUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inputUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The input uri of source file.
+     * 
+ * + * string input_uri = 1; + */ + public com.google.protobuf.ByteString getInputUriBytes() { + java.lang.Object ref = inputUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inputUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The input uri of source file.
+     * 
+ * + * string input_uri = 1; + */ + public Builder setInputUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inputUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The input uri of source file.
+     * 
+ * + * string input_uri = 1; + */ + public Builder clearInputUri() { + + inputUri_ = getDefaultInstance().getInputUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The input uri of source file.
+     * 
+ * + * string input_uri = 1; + */ + public Builder setInputUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inputUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object mimeType_ = ""; + /** + * + * + *
+     * Required. The format of the gcs source. Only "text/csv" is supported.
+     * 
+ * + * string mime_type = 2; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The format of the gcs source. Only "text/csv" is supported.
+     * 
+ * + * string mime_type = 2; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The format of the gcs source. Only "text/csv" is supported.
+     * 
+ * + * string mime_type = 2; + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The format of the gcs source. Only "text/csv" is supported.
+     * 
+ * + * string mime_type = 2; + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The format of the gcs source. Only "text/csv" is supported.
+     * 
+ * + * string mime_type = 2; + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.GcsSource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.GcsSource) + private static final com.google.cloud.datalabeling.v1beta1.GcsSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.GcsSource(); + } + + public static com.google.cloud.datalabeling.v1beta1.GcsSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GcsSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsSourceOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsSourceOrBuilder.java new file mode 100644 index 000000000000..5f45a6262bff --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GcsSourceOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface GcsSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.GcsSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The input uri of source file.
+   * 
+ * + * string input_uri = 1; + */ + java.lang.String getInputUri(); + /** + * + * + *
+   * Required. The input uri of source file.
+   * 
+ * + * string input_uri = 1; + */ + com.google.protobuf.ByteString getInputUriBytes(); + + /** + * + * + *
+   * Required. The format of the gcs source. Only "text/csv" is supported.
+   * 
+ * + * string mime_type = 2; + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * Required. The format of the gcs source. Only "text/csv" is supported.
+   * 
+ * + * string mime_type = 2; + */ + com.google.protobuf.ByteString getMimeTypeBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotatedDatasetRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotatedDatasetRequest.java new file mode 100644 index 000000000000..737b8736c9bd --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotatedDatasetRequest.java @@ -0,0 +1,620 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for GetAnnotatedDataset.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest} + */ +public final class GetAnnotatedDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest) + GetAnnotatedDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAnnotatedDatasetRequest.newBuilder() to construct. + private GetAnnotatedDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAnnotatedDatasetRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAnnotatedDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetAnnotatedDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetAnnotatedDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest.class, + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of the annotated dataset to get, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the annotated dataset to get, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest other = + (com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetAnnotatedDataset.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest) + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetAnnotatedDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetAnnotatedDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest.class, + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetAnnotatedDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest build() { + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest result = + new com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest other) { + if (other + == com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of the annotated dataset to get, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the annotated dataset to get, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the annotated dataset to get, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the annotated dataset to get, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the annotated dataset to get, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest) + private static final com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAnnotatedDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAnnotatedDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotatedDatasetRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotatedDatasetRequestOrBuilder.java new file mode 100644 index 000000000000..ccc9b74b9fd3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotatedDatasetRequestOrBuilder.java @@ -0,0 +1,35 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface GetAnnotatedDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the annotated dataset to get, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of the annotated dataset to get, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotationSpecSetRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotationSpecSetRequest.java new file mode 100644 index 000000000000..7afa83da4622 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotationSpecSetRequest.java @@ -0,0 +1,615 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for GetAnnotationSpecSet.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest} + */ +public final class GetAnnotationSpecSetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest) + GetAnnotationSpecSetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAnnotationSpecSetRequest.newBuilder() to construct. + private GetAnnotationSpecSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAnnotationSpecSetRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAnnotationSpecSetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetAnnotationSpecSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetAnnotationSpecSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest.class, + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. AnnotationSpecSet resource name, format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. AnnotationSpecSet resource name, format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest other = + (com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetAnnotationSpecSet.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest) + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetAnnotationSpecSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetAnnotationSpecSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest.class, + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetAnnotationSpecSetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest build() { + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest result = + new com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest other) { + if (other + == com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. AnnotationSpecSet resource name, format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. AnnotationSpecSet resource name, format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. AnnotationSpecSet resource name, format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. AnnotationSpecSet resource name, format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. AnnotationSpecSet resource name, format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest) + private static final com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAnnotationSpecSetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAnnotationSpecSetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotationSpecSetRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotationSpecSetRequestOrBuilder.java new file mode 100644 index 000000000000..03f4efb8e928 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetAnnotationSpecSetRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface GetAnnotationSpecSetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. AnnotationSpecSet resource name, format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. AnnotationSpecSet resource name, format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDataItemRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDataItemRequest.java new file mode 100644 index 000000000000..89ca6b6d77c3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDataItemRequest.java @@ -0,0 +1,606 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for GetDataItem.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetDataItemRequest} + */ +public final class GetDataItemRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.GetDataItemRequest) + GetDataItemRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDataItemRequest.newBuilder() to construct. + private GetDataItemRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDataItemRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDataItemRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetDataItemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetDataItemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest.class, + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the data item to get, format:
+   * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the data item to get, format:
+   * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.GetDataItemRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest other = + (com.google.cloud.datalabeling.v1beta1.GetDataItemRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetDataItem.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetDataItemRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.GetDataItemRequest) + com.google.cloud.datalabeling.v1beta1.GetDataItemRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetDataItemRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetDataItemRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest.class, + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.GetDataItemRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetDataItemRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetDataItemRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.GetDataItemRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetDataItemRequest build() { + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetDataItemRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest result = + new com.google.cloud.datalabeling.v1beta1.GetDataItemRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.GetDataItemRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.GetDataItemRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.GetDataItemRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.GetDataItemRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.GetDataItemRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.GetDataItemRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the data item to get, format:
+     * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the data item to get, format:
+     * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the data item to get, format:
+     * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the data item to get, format:
+     * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the data item to get, format:
+     * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.GetDataItemRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.GetDataItemRequest) + private static final com.google.cloud.datalabeling.v1beta1.GetDataItemRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.GetDataItemRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDataItemRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataItemRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDataItemRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetDataItemRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDataItemRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDataItemRequestOrBuilder.java new file mode 100644 index 000000000000..92b95086747d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDataItemRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface GetDataItemRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.GetDataItemRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the data item to get, format:
+   * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the data item to get, format:
+   * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDatasetRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDatasetRequest.java new file mode 100644 index 000000000000..2bb4b834b38a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDatasetRequest.java @@ -0,0 +1,606 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for GetDataSet.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetDatasetRequest} + */ +public final class GetDatasetRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.GetDatasetRequest) + GetDatasetRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDatasetRequest.newBuilder() to construct. + private GetDatasetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDatasetRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetDatasetRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest.class, + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.GetDatasetRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest other = + (com.google.cloud.datalabeling.v1beta1.GetDatasetRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetDataSet.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetDatasetRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.GetDatasetRequest) + com.google.cloud.datalabeling.v1beta1.GetDatasetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetDatasetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest.class, + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.GetDatasetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetDatasetRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetDatasetRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.GetDatasetRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetDatasetRequest build() { + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetDatasetRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest result = + new com.google.cloud.datalabeling.v1beta1.GetDatasetRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.GetDatasetRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.GetDatasetRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.GetDatasetRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.GetDatasetRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.GetDatasetRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.GetDatasetRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.GetDatasetRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.GetDatasetRequest) + private static final com.google.cloud.datalabeling.v1beta1.GetDatasetRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.GetDatasetRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.GetDatasetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDatasetRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetDatasetRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetDatasetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDatasetRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDatasetRequestOrBuilder.java new file mode 100644 index 000000000000..e8a088a6aa25 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetDatasetRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface GetDatasetRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.GetDatasetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetExampleRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetExampleRequest.java new file mode 100644 index 000000000000..548f98d28805 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetExampleRequest.java @@ -0,0 +1,788 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for GetExample
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetExampleRequest} + */ +public final class GetExampleRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.GetExampleRequest) + GetExampleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetExampleRequest.newBuilder() to construct. + private GetExampleRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetExampleRequest() { + name_ = ""; + filter_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetExampleRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetExampleRequest.class, + com.google.cloud.datalabeling.v1beta1.GetExampleRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Name of example, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}/examples/{example_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of example, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}/examples/{example_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. An expression for filtering Examples. Filter by
+   * annotation_spec.display_name is supported. Format
+   * "annotation_spec.display_name = {display_name}"
+   * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An expression for filtering Examples. Filter by
+   * annotation_spec.display_name is supported. Format
+   * "annotation_spec.display_name = {display_name}"
+   * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.GetExampleRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.GetExampleRequest other = + (com.google.cloud.datalabeling.v1beta1.GetExampleRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.GetExampleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetExample
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetExampleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.GetExampleRequest) + com.google.cloud.datalabeling.v1beta1.GetExampleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetExampleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetExampleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetExampleRequest.class, + com.google.cloud.datalabeling.v1beta1.GetExampleRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.GetExampleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetExampleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetExampleRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.GetExampleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetExampleRequest build() { + com.google.cloud.datalabeling.v1beta1.GetExampleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetExampleRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.GetExampleRequest result = + new com.google.cloud.datalabeling.v1beta1.GetExampleRequest(this); + result.name_ = name_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.GetExampleRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.GetExampleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.GetExampleRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.GetExampleRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.GetExampleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.GetExampleRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Name of example, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}/examples/{example_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of example, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}/examples/{example_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of example, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}/examples/{example_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of example, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}/examples/{example_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of example, format:
+     * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+     * {annotated_dataset_id}/examples/{example_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. An expression for filtering Examples. Filter by
+     * annotation_spec.display_name is supported. Format
+     * "annotation_spec.display_name = {display_name}"
+     * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering Examples. Filter by
+     * annotation_spec.display_name is supported. Format
+     * "annotation_spec.display_name = {display_name}"
+     * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering Examples. Filter by
+     * annotation_spec.display_name is supported. Format
+     * "annotation_spec.display_name = {display_name}"
+     * 
+ * + * string filter = 2; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering Examples. Filter by
+     * annotation_spec.display_name is supported. Format
+     * "annotation_spec.display_name = {display_name}"
+     * 
+ * + * string filter = 2; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering Examples. Filter by
+     * annotation_spec.display_name is supported. Format
+     * "annotation_spec.display_name = {display_name}"
+     * 
+ * + * string filter = 2; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.GetExampleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.GetExampleRequest) + private static final com.google.cloud.datalabeling.v1beta1.GetExampleRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.GetExampleRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.GetExampleRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetExampleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetExampleRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetExampleRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetExampleRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetExampleRequestOrBuilder.java new file mode 100644 index 000000000000..5aa565bc72fc --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetExampleRequestOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface GetExampleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.GetExampleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of example, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}/examples/{example_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Name of example, format:
+   * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/
+   * {annotated_dataset_id}/examples/{example_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An expression for filtering Examples. Filter by
+   * annotation_spec.display_name is supported. Format
+   * "annotation_spec.display_name = {display_name}"
+   * 
+ * + * string filter = 2; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. An expression for filtering Examples. Filter by
+   * annotation_spec.display_name is supported. Format
+   * "annotation_spec.display_name = {display_name}"
+   * 
+ * + * string filter = 2; + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetInstructionRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetInstructionRequest.java new file mode 100644 index 000000000000..c5137f7b1d22 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetInstructionRequest.java @@ -0,0 +1,606 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for GetInstruction.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetInstructionRequest} + */ +public final class GetInstructionRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.GetInstructionRequest) + GetInstructionRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetInstructionRequest.newBuilder() to construct. + private GetInstructionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetInstructionRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetInstructionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetInstructionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetInstructionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest.class, + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.GetInstructionRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest other = + (com.google.cloud.datalabeling.v1beta1.GetInstructionRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetInstruction.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.GetInstructionRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.GetInstructionRequest) + com.google.cloud.datalabeling.v1beta1.GetInstructionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetInstructionRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetInstructionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest.class, + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.GetInstructionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_GetInstructionRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetInstructionRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.GetInstructionRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetInstructionRequest build() { + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetInstructionRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest result = + new com.google.cloud.datalabeling.v1beta1.GetInstructionRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.GetInstructionRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.GetInstructionRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.GetInstructionRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.GetInstructionRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.GetInstructionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.GetInstructionRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.GetInstructionRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.GetInstructionRequest) + private static final com.google.cloud.datalabeling.v1beta1.GetInstructionRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.GetInstructionRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.GetInstructionRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetInstructionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetInstructionRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.GetInstructionRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetInstructionRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetInstructionRequestOrBuilder.java new file mode 100644 index 000000000000..0918a4a21b82 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/GetInstructionRequestOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface GetInstructionRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.GetInstructionRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/HumanAnnotationConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/HumanAnnotationConfig.java new file mode 100644 index 000000000000..9c50480abbc6 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/HumanAnnotationConfig.java @@ -0,0 +1,1970 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Configuration for how human labeling task should be done.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.HumanAnnotationConfig} + */ +public final class HumanAnnotationConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.HumanAnnotationConfig) + HumanAnnotationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use HumanAnnotationConfig.newBuilder() to construct. + private HumanAnnotationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HumanAnnotationConfig() { + instruction_ = ""; + annotatedDatasetDisplayName_ = ""; + annotatedDatasetDescription_ = ""; + labelGroup_ = ""; + languageCode_ = ""; + contributorEmails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private HumanAnnotationConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + instruction_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotatedDatasetDisplayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotatedDatasetDescription_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + labelGroup_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 48: + { + replicaCount_ = input.readInt32(); + break; + } + case 58: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (questionDuration_ != null) { + subBuilder = questionDuration_.toBuilder(); + } + questionDuration_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(questionDuration_); + questionDuration_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000080) != 0)) { + contributorEmails_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000080; + } + contributorEmails_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000080) != 0)) { + contributorEmails_ = contributorEmails_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_HumanAnnotationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_HumanAnnotationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.class, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder.class); + } + + private int bitField0_; + public static final int INSTRUCTION_FIELD_NUMBER = 1; + private volatile java.lang.Object instruction_; + /** + * + * + *
+   * Required except for LabelAudio case. Instruction resource name.
+   * 
+ * + * string instruction = 1; + */ + public java.lang.String getInstruction() { + java.lang.Object ref = instruction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instruction_ = s; + return s; + } + } + /** + * + * + *
+   * Required except for LabelAudio case. Instruction resource name.
+   * 
+ * + * string instruction = 1; + */ + public com.google.protobuf.ByteString getInstructionBytes() { + java.lang.Object ref = instruction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATED_DATASET_DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object annotatedDatasetDisplayName_; + /** + * + * + *
+   * Required. A human-readable name for AnnotatedDataset defined by
+   * users. Maximum of 64 characters
+   * .
+   * 
+ * + * string annotated_dataset_display_name = 2; + */ + public java.lang.String getAnnotatedDatasetDisplayName() { + java.lang.Object ref = annotatedDatasetDisplayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotatedDatasetDisplayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. A human-readable name for AnnotatedDataset defined by
+   * users. Maximum of 64 characters
+   * .
+   * 
+ * + * string annotated_dataset_display_name = 2; + */ + public com.google.protobuf.ByteString getAnnotatedDatasetDisplayNameBytes() { + java.lang.Object ref = annotatedDatasetDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDatasetDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANNOTATED_DATASET_DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object annotatedDatasetDescription_; + /** + * + * + *
+   * Optional. A human-readable description for AnnotatedDataset.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string annotated_dataset_description = 3; + */ + public java.lang.String getAnnotatedDatasetDescription() { + java.lang.Object ref = annotatedDatasetDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotatedDatasetDescription_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A human-readable description for AnnotatedDataset.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string annotated_dataset_description = 3; + */ + public com.google.protobuf.ByteString getAnnotatedDatasetDescriptionBytes() { + java.lang.Object ref = annotatedDatasetDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDatasetDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LABEL_GROUP_FIELD_NUMBER = 4; + private volatile java.lang.Object labelGroup_; + /** + * + * + *
+   * Optional. A human-readable label used to logically group labeling tasks.
+   * This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
+   * 
+ * + * string label_group = 4; + */ + public java.lang.String getLabelGroup() { + java.lang.Object ref = labelGroup_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + labelGroup_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A human-readable label used to logically group labeling tasks.
+   * This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
+   * 
+ * + * string label_group = 4; + */ + public com.google.protobuf.ByteString getLabelGroupBytes() { + java.lang.Object ref = labelGroup_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + labelGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 5; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * Optional. The Language of this question, as a
+   * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+   * Default value is en-US.
+   * Only need to set this when task is language related. For example, French
+   * text classification or Chinese audio transcription.
+   * 
+ * + * string language_code = 5; + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The Language of this question, as a
+   * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+   * Default value is en-US.
+   * Only need to set this when task is language related. For example, French
+   * text classification or Chinese audio transcription.
+   * 
+ * + * string language_code = 5; + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPLICA_COUNT_FIELD_NUMBER = 6; + private int replicaCount_; + /** + * + * + *
+   * Optional. Replication of questions. Each question will be sent to up to
+   * this number of contributors to label. Aggregated answers will be returned.
+   * Default is set to 1.
+   * For image related labeling, valid values are 1, 3, 5.
+   * 
+ * + * int32 replica_count = 6; + */ + public int getReplicaCount() { + return replicaCount_; + } + + public static final int QUESTION_DURATION_FIELD_NUMBER = 7; + private com.google.protobuf.Duration questionDuration_; + /** + * + * + *
+   * Optional. Maximum duration for contributors to answer a question. Default
+   * is 1800 seconds.
+   * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + public boolean hasQuestionDuration() { + return questionDuration_ != null; + } + /** + * + * + *
+   * Optional. Maximum duration for contributors to answer a question. Default
+   * is 1800 seconds.
+   * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + public com.google.protobuf.Duration getQuestionDuration() { + return questionDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : questionDuration_; + } + /** + * + * + *
+   * Optional. Maximum duration for contributors to answer a question. Default
+   * is 1800 seconds.
+   * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + public com.google.protobuf.DurationOrBuilder getQuestionDurationOrBuilder() { + return getQuestionDuration(); + } + + public static final int CONTRIBUTOR_EMAILS_FIELD_NUMBER = 9; + private com.google.protobuf.LazyStringList contributorEmails_; + /** + * + * + *
+   * Optional. If you want your own labeling contributors to manage and work on
+   * this labeling request, you can set these contributors here. We will give
+   * them access to the question types in crowdcompute. Note that these
+   * emails must be registered in crowdcompute worker UI:
+   * https://crowd-compute.appspot.com/
+   * 
+ * + * repeated string contributor_emails = 9; + */ + public com.google.protobuf.ProtocolStringList getContributorEmailsList() { + return contributorEmails_; + } + /** + * + * + *
+   * Optional. If you want your own labeling contributors to manage and work on
+   * this labeling request, you can set these contributors here. We will give
+   * them access to the question types in crowdcompute. Note that these
+   * emails must be registered in crowdcompute worker UI:
+   * https://crowd-compute.appspot.com/
+   * 
+ * + * repeated string contributor_emails = 9; + */ + public int getContributorEmailsCount() { + return contributorEmails_.size(); + } + /** + * + * + *
+   * Optional. If you want your own labeling contributors to manage and work on
+   * this labeling request, you can set these contributors here. We will give
+   * them access to the question types in crowdcompute. Note that these
+   * emails must be registered in crowdcompute worker UI:
+   * https://crowd-compute.appspot.com/
+   * 
+ * + * repeated string contributor_emails = 9; + */ + public java.lang.String getContributorEmails(int index) { + return contributorEmails_.get(index); + } + /** + * + * + *
+   * Optional. If you want your own labeling contributors to manage and work on
+   * this labeling request, you can set these contributors here. We will give
+   * them access to the question types in crowdcompute. Note that these
+   * emails must be registered in crowdcompute worker UI:
+   * https://crowd-compute.appspot.com/
+   * 
+ * + * repeated string contributor_emails = 9; + */ + public com.google.protobuf.ByteString getContributorEmailsBytes(int index) { + return contributorEmails_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getInstructionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instruction_); + } + if (!getAnnotatedDatasetDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, annotatedDatasetDisplayName_); + } + if (!getAnnotatedDatasetDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, annotatedDatasetDescription_); + } + if (!getLabelGroupBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, labelGroup_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, languageCode_); + } + if (replicaCount_ != 0) { + output.writeInt32(6, replicaCount_); + } + if (questionDuration_ != null) { + output.writeMessage(7, getQuestionDuration()); + } + for (int i = 0; i < contributorEmails_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, contributorEmails_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getInstructionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instruction_); + } + if (!getAnnotatedDatasetDisplayNameBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(2, annotatedDatasetDisplayName_); + } + if (!getAnnotatedDatasetDescriptionBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(3, annotatedDatasetDescription_); + } + if (!getLabelGroupBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, labelGroup_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, languageCode_); + } + if (replicaCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, replicaCount_); + } + if (questionDuration_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getQuestionDuration()); + } + { + int dataSize = 0; + for (int i = 0; i < contributorEmails_.size(); i++) { + dataSize += computeStringSizeNoTag(contributorEmails_.getRaw(i)); + } + size += dataSize; + size += 1 * getContributorEmailsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig other = + (com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig) obj; + + if (!getInstruction().equals(other.getInstruction())) return false; + if (!getAnnotatedDatasetDisplayName().equals(other.getAnnotatedDatasetDisplayName())) + return false; + if (!getAnnotatedDatasetDescription().equals(other.getAnnotatedDatasetDescription())) + return false; + if (!getLabelGroup().equals(other.getLabelGroup())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (getReplicaCount() != other.getReplicaCount()) return false; + if (hasQuestionDuration() != other.hasQuestionDuration()) return false; + if (hasQuestionDuration()) { + if (!getQuestionDuration().equals(other.getQuestionDuration())) return false; + } + if (!getContributorEmailsList().equals(other.getContributorEmailsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getInstruction().hashCode(); + hash = (37 * hash) + ANNOTATED_DATASET_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAnnotatedDatasetDisplayName().hashCode(); + hash = (37 * hash) + ANNOTATED_DATASET_DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getAnnotatedDatasetDescription().hashCode(); + hash = (37 * hash) + LABEL_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getLabelGroup().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + REPLICA_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getReplicaCount(); + if (hasQuestionDuration()) { + hash = (37 * hash) + QUESTION_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getQuestionDuration().hashCode(); + } + if (getContributorEmailsCount() > 0) { + hash = (37 * hash) + CONTRIBUTOR_EMAILS_FIELD_NUMBER; + hash = (53 * hash) + getContributorEmailsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Configuration for how human labeling task should be done.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.HumanAnnotationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.HumanAnnotationConfig) + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_HumanAnnotationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_HumanAnnotationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.class, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + instruction_ = ""; + + annotatedDatasetDisplayName_ = ""; + + annotatedDatasetDescription_ = ""; + + labelGroup_ = ""; + + languageCode_ = ""; + + replicaCount_ = 0; + + if (questionDurationBuilder_ == null) { + questionDuration_ = null; + } else { + questionDuration_ = null; + questionDurationBuilder_ = null; + } + contributorEmails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_HumanAnnotationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig build() { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig result = + new com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.instruction_ = instruction_; + result.annotatedDatasetDisplayName_ = annotatedDatasetDisplayName_; + result.annotatedDatasetDescription_ = annotatedDatasetDescription_; + result.labelGroup_ = labelGroup_; + result.languageCode_ = languageCode_; + result.replicaCount_ = replicaCount_; + if (questionDurationBuilder_ == null) { + result.questionDuration_ = questionDuration_; + } else { + result.questionDuration_ = questionDurationBuilder_.build(); + } + if (((bitField0_ & 0x00000080) != 0)) { + contributorEmails_ = contributorEmails_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.contributorEmails_ = contributorEmails_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig other) { + if (other == com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance()) + return this; + if (!other.getInstruction().isEmpty()) { + instruction_ = other.instruction_; + onChanged(); + } + if (!other.getAnnotatedDatasetDisplayName().isEmpty()) { + annotatedDatasetDisplayName_ = other.annotatedDatasetDisplayName_; + onChanged(); + } + if (!other.getAnnotatedDatasetDescription().isEmpty()) { + annotatedDatasetDescription_ = other.annotatedDatasetDescription_; + onChanged(); + } + if (!other.getLabelGroup().isEmpty()) { + labelGroup_ = other.labelGroup_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (other.getReplicaCount() != 0) { + setReplicaCount(other.getReplicaCount()); + } + if (other.hasQuestionDuration()) { + mergeQuestionDuration(other.getQuestionDuration()); + } + if (!other.contributorEmails_.isEmpty()) { + if (contributorEmails_.isEmpty()) { + contributorEmails_ = other.contributorEmails_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureContributorEmailsIsMutable(); + contributorEmails_.addAll(other.contributorEmails_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object instruction_ = ""; + /** + * + * + *
+     * Required except for LabelAudio case. Instruction resource name.
+     * 
+ * + * string instruction = 1; + */ + public java.lang.String getInstruction() { + java.lang.Object ref = instruction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instruction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required except for LabelAudio case. Instruction resource name.
+     * 
+ * + * string instruction = 1; + */ + public com.google.protobuf.ByteString getInstructionBytes() { + java.lang.Object ref = instruction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instruction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required except for LabelAudio case. Instruction resource name.
+     * 
+ * + * string instruction = 1; + */ + public Builder setInstruction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instruction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required except for LabelAudio case. Instruction resource name.
+     * 
+ * + * string instruction = 1; + */ + public Builder clearInstruction() { + + instruction_ = getDefaultInstance().getInstruction(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required except for LabelAudio case. Instruction resource name.
+     * 
+ * + * string instruction = 1; + */ + public Builder setInstructionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instruction_ = value; + onChanged(); + return this; + } + + private java.lang.Object annotatedDatasetDisplayName_ = ""; + /** + * + * + *
+     * Required. A human-readable name for AnnotatedDataset defined by
+     * users. Maximum of 64 characters
+     * .
+     * 
+ * + * string annotated_dataset_display_name = 2; + */ + public java.lang.String getAnnotatedDatasetDisplayName() { + java.lang.Object ref = annotatedDatasetDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotatedDatasetDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. A human-readable name for AnnotatedDataset defined by
+     * users. Maximum of 64 characters
+     * .
+     * 
+ * + * string annotated_dataset_display_name = 2; + */ + public com.google.protobuf.ByteString getAnnotatedDatasetDisplayNameBytes() { + java.lang.Object ref = annotatedDatasetDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDatasetDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. A human-readable name for AnnotatedDataset defined by
+     * users. Maximum of 64 characters
+     * .
+     * 
+ * + * string annotated_dataset_display_name = 2; + */ + public Builder setAnnotatedDatasetDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotatedDatasetDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A human-readable name for AnnotatedDataset defined by
+     * users. Maximum of 64 characters
+     * .
+     * 
+ * + * string annotated_dataset_display_name = 2; + */ + public Builder clearAnnotatedDatasetDisplayName() { + + annotatedDatasetDisplayName_ = getDefaultInstance().getAnnotatedDatasetDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. A human-readable name for AnnotatedDataset defined by
+     * users. Maximum of 64 characters
+     * .
+     * 
+ * + * string annotated_dataset_display_name = 2; + */ + public Builder setAnnotatedDatasetDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotatedDatasetDisplayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object annotatedDatasetDescription_ = ""; + /** + * + * + *
+     * Optional. A human-readable description for AnnotatedDataset.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string annotated_dataset_description = 3; + */ + public java.lang.String getAnnotatedDatasetDescription() { + java.lang.Object ref = annotatedDatasetDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotatedDatasetDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A human-readable description for AnnotatedDataset.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string annotated_dataset_description = 3; + */ + public com.google.protobuf.ByteString getAnnotatedDatasetDescriptionBytes() { + java.lang.Object ref = annotatedDatasetDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotatedDatasetDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A human-readable description for AnnotatedDataset.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string annotated_dataset_description = 3; + */ + public Builder setAnnotatedDatasetDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotatedDatasetDescription_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human-readable description for AnnotatedDataset.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string annotated_dataset_description = 3; + */ + public Builder clearAnnotatedDatasetDescription() { + + annotatedDatasetDescription_ = getDefaultInstance().getAnnotatedDatasetDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human-readable description for AnnotatedDataset.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string annotated_dataset_description = 3; + */ + public Builder setAnnotatedDatasetDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotatedDatasetDescription_ = value; + onChanged(); + return this; + } + + private java.lang.Object labelGroup_ = ""; + /** + * + * + *
+     * Optional. A human-readable label used to logically group labeling tasks.
+     * This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
+     * 
+ * + * string label_group = 4; + */ + public java.lang.String getLabelGroup() { + java.lang.Object ref = labelGroup_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + labelGroup_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A human-readable label used to logically group labeling tasks.
+     * This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
+     * 
+ * + * string label_group = 4; + */ + public com.google.protobuf.ByteString getLabelGroupBytes() { + java.lang.Object ref = labelGroup_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + labelGroup_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A human-readable label used to logically group labeling tasks.
+     * This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
+     * 
+ * + * string label_group = 4; + */ + public Builder setLabelGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + labelGroup_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human-readable label used to logically group labeling tasks.
+     * This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
+     * 
+ * + * string label_group = 4; + */ + public Builder clearLabelGroup() { + + labelGroup_ = getDefaultInstance().getLabelGroup(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A human-readable label used to logically group labeling tasks.
+     * This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
+     * 
+ * + * string label_group = 4; + */ + public Builder setLabelGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + labelGroup_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Optional. The Language of this question, as a
+     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+     * Default value is en-US.
+     * Only need to set this when task is language related. For example, French
+     * text classification or Chinese audio transcription.
+     * 
+ * + * string language_code = 5; + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The Language of this question, as a
+     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+     * Default value is en-US.
+     * Only need to set this when task is language related. For example, French
+     * text classification or Chinese audio transcription.
+     * 
+ * + * string language_code = 5; + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The Language of this question, as a
+     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+     * Default value is en-US.
+     * Only need to set this when task is language related. For example, French
+     * text classification or Chinese audio transcription.
+     * 
+ * + * string language_code = 5; + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Language of this question, as a
+     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+     * Default value is en-US.
+     * Only need to set this when task is language related. For example, French
+     * text classification or Chinese audio transcription.
+     * 
+ * + * string language_code = 5; + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The Language of this question, as a
+     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+     * Default value is en-US.
+     * Only need to set this when task is language related. For example, French
+     * text classification or Chinese audio transcription.
+     * 
+ * + * string language_code = 5; + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private int replicaCount_; + /** + * + * + *
+     * Optional. Replication of questions. Each question will be sent to up to
+     * this number of contributors to label. Aggregated answers will be returned.
+     * Default is set to 1.
+     * For image related labeling, valid values are 1, 3, 5.
+     * 
+ * + * int32 replica_count = 6; + */ + public int getReplicaCount() { + return replicaCount_; + } + /** + * + * + *
+     * Optional. Replication of questions. Each question will be sent to up to
+     * this number of contributors to label. Aggregated answers will be returned.
+     * Default is set to 1.
+     * For image related labeling, valid values are 1, 3, 5.
+     * 
+ * + * int32 replica_count = 6; + */ + public Builder setReplicaCount(int value) { + + replicaCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Replication of questions. Each question will be sent to up to
+     * this number of contributors to label. Aggregated answers will be returned.
+     * Default is set to 1.
+     * For image related labeling, valid values are 1, 3, 5.
+     * 
+ * + * int32 replica_count = 6; + */ + public Builder clearReplicaCount() { + + replicaCount_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration questionDuration_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + questionDurationBuilder_; + /** + * + * + *
+     * Optional. Maximum duration for contributors to answer a question. Default
+     * is 1800 seconds.
+     * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + public boolean hasQuestionDuration() { + return questionDurationBuilder_ != null || questionDuration_ != null; + } + /** + * + * + *
+     * Optional. Maximum duration for contributors to answer a question. Default
+     * is 1800 seconds.
+     * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + public com.google.protobuf.Duration getQuestionDuration() { + if (questionDurationBuilder_ == null) { + return questionDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : questionDuration_; + } else { + return questionDurationBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Maximum duration for contributors to answer a question. Default
+     * is 1800 seconds.
+     * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + public Builder setQuestionDuration(com.google.protobuf.Duration value) { + if (questionDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + questionDuration_ = value; + onChanged(); + } else { + questionDurationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Maximum duration for contributors to answer a question. Default
+     * is 1800 seconds.
+     * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + public Builder setQuestionDuration(com.google.protobuf.Duration.Builder builderForValue) { + if (questionDurationBuilder_ == null) { + questionDuration_ = builderForValue.build(); + onChanged(); + } else { + questionDurationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Maximum duration for contributors to answer a question. Default
+     * is 1800 seconds.
+     * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + public Builder mergeQuestionDuration(com.google.protobuf.Duration value) { + if (questionDurationBuilder_ == null) { + if (questionDuration_ != null) { + questionDuration_ = + com.google.protobuf.Duration.newBuilder(questionDuration_) + .mergeFrom(value) + .buildPartial(); + } else { + questionDuration_ = value; + } + onChanged(); + } else { + questionDurationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Maximum duration for contributors to answer a question. Default
+     * is 1800 seconds.
+     * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + public Builder clearQuestionDuration() { + if (questionDurationBuilder_ == null) { + questionDuration_ = null; + onChanged(); + } else { + questionDuration_ = null; + questionDurationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Maximum duration for contributors to answer a question. Default
+     * is 1800 seconds.
+     * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + public com.google.protobuf.Duration.Builder getQuestionDurationBuilder() { + + onChanged(); + return getQuestionDurationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Maximum duration for contributors to answer a question. Default
+     * is 1800 seconds.
+     * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + public com.google.protobuf.DurationOrBuilder getQuestionDurationOrBuilder() { + if (questionDurationBuilder_ != null) { + return questionDurationBuilder_.getMessageOrBuilder(); + } else { + return questionDuration_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : questionDuration_; + } + } + /** + * + * + *
+     * Optional. Maximum duration for contributors to answer a question. Default
+     * is 1800 seconds.
+     * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getQuestionDurationFieldBuilder() { + if (questionDurationBuilder_ == null) { + questionDurationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getQuestionDuration(), getParentForChildren(), isClean()); + questionDuration_ = null; + } + return questionDurationBuilder_; + } + + private com.google.protobuf.LazyStringList contributorEmails_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureContributorEmailsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + contributorEmails_ = new com.google.protobuf.LazyStringArrayList(contributorEmails_); + bitField0_ |= 0x00000080; + } + } + /** + * + * + *
+     * Optional. If you want your own labeling contributors to manage and work on
+     * this labeling request, you can set these contributors here. We will give
+     * them access to the question types in crowdcompute. Note that these
+     * emails must be registered in crowdcompute worker UI:
+     * https://crowd-compute.appspot.com/
+     * 
+ * + * repeated string contributor_emails = 9; + */ + public com.google.protobuf.ProtocolStringList getContributorEmailsList() { + return contributorEmails_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. If you want your own labeling contributors to manage and work on
+     * this labeling request, you can set these contributors here. We will give
+     * them access to the question types in crowdcompute. Note that these
+     * emails must be registered in crowdcompute worker UI:
+     * https://crowd-compute.appspot.com/
+     * 
+ * + * repeated string contributor_emails = 9; + */ + public int getContributorEmailsCount() { + return contributorEmails_.size(); + } + /** + * + * + *
+     * Optional. If you want your own labeling contributors to manage and work on
+     * this labeling request, you can set these contributors here. We will give
+     * them access to the question types in crowdcompute. Note that these
+     * emails must be registered in crowdcompute worker UI:
+     * https://crowd-compute.appspot.com/
+     * 
+ * + * repeated string contributor_emails = 9; + */ + public java.lang.String getContributorEmails(int index) { + return contributorEmails_.get(index); + } + /** + * + * + *
+     * Optional. If you want your own labeling contributors to manage and work on
+     * this labeling request, you can set these contributors here. We will give
+     * them access to the question types in crowdcompute. Note that these
+     * emails must be registered in crowdcompute worker UI:
+     * https://crowd-compute.appspot.com/
+     * 
+ * + * repeated string contributor_emails = 9; + */ + public com.google.protobuf.ByteString getContributorEmailsBytes(int index) { + return contributorEmails_.getByteString(index); + } + /** + * + * + *
+     * Optional. If you want your own labeling contributors to manage and work on
+     * this labeling request, you can set these contributors here. We will give
+     * them access to the question types in crowdcompute. Note that these
+     * emails must be registered in crowdcompute worker UI:
+     * https://crowd-compute.appspot.com/
+     * 
+ * + * repeated string contributor_emails = 9; + */ + public Builder setContributorEmails(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContributorEmailsIsMutable(); + contributorEmails_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If you want your own labeling contributors to manage and work on
+     * this labeling request, you can set these contributors here. We will give
+     * them access to the question types in crowdcompute. Note that these
+     * emails must be registered in crowdcompute worker UI:
+     * https://crowd-compute.appspot.com/
+     * 
+ * + * repeated string contributor_emails = 9; + */ + public Builder addContributorEmails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureContributorEmailsIsMutable(); + contributorEmails_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If you want your own labeling contributors to manage and work on
+     * this labeling request, you can set these contributors here. We will give
+     * them access to the question types in crowdcompute. Note that these
+     * emails must be registered in crowdcompute worker UI:
+     * https://crowd-compute.appspot.com/
+     * 
+ * + * repeated string contributor_emails = 9; + */ + public Builder addAllContributorEmails(java.lang.Iterable values) { + ensureContributorEmailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contributorEmails_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If you want your own labeling contributors to manage and work on
+     * this labeling request, you can set these contributors here. We will give
+     * them access to the question types in crowdcompute. Note that these
+     * emails must be registered in crowdcompute worker UI:
+     * https://crowd-compute.appspot.com/
+     * 
+ * + * repeated string contributor_emails = 9; + */ + public Builder clearContributorEmails() { + contributorEmails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If you want your own labeling contributors to manage and work on
+     * this labeling request, you can set these contributors here. We will give
+     * them access to the question types in crowdcompute. Note that these
+     * emails must be registered in crowdcompute worker UI:
+     * https://crowd-compute.appspot.com/
+     * 
+ * + * repeated string contributor_emails = 9; + */ + public Builder addContributorEmailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureContributorEmailsIsMutable(); + contributorEmails_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.HumanAnnotationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.HumanAnnotationConfig) + private static final com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HumanAnnotationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HumanAnnotationConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/HumanAnnotationConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/HumanAnnotationConfigOrBuilder.java new file mode 100644 index 000000000000..b2b6c8f496da --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/HumanAnnotationConfigOrBuilder.java @@ -0,0 +1,236 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface HumanAnnotationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.HumanAnnotationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required except for LabelAudio case. Instruction resource name.
+   * 
+ * + * string instruction = 1; + */ + java.lang.String getInstruction(); + /** + * + * + *
+   * Required except for LabelAudio case. Instruction resource name.
+   * 
+ * + * string instruction = 1; + */ + com.google.protobuf.ByteString getInstructionBytes(); + + /** + * + * + *
+   * Required. A human-readable name for AnnotatedDataset defined by
+   * users. Maximum of 64 characters
+   * .
+   * 
+ * + * string annotated_dataset_display_name = 2; + */ + java.lang.String getAnnotatedDatasetDisplayName(); + /** + * + * + *
+   * Required. A human-readable name for AnnotatedDataset defined by
+   * users. Maximum of 64 characters
+   * .
+   * 
+ * + * string annotated_dataset_display_name = 2; + */ + com.google.protobuf.ByteString getAnnotatedDatasetDisplayNameBytes(); + + /** + * + * + *
+   * Optional. A human-readable description for AnnotatedDataset.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string annotated_dataset_description = 3; + */ + java.lang.String getAnnotatedDatasetDescription(); + /** + * + * + *
+   * Optional. A human-readable description for AnnotatedDataset.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string annotated_dataset_description = 3; + */ + com.google.protobuf.ByteString getAnnotatedDatasetDescriptionBytes(); + + /** + * + * + *
+   * Optional. A human-readable label used to logically group labeling tasks.
+   * This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
+   * 
+ * + * string label_group = 4; + */ + java.lang.String getLabelGroup(); + /** + * + * + *
+   * Optional. A human-readable label used to logically group labeling tasks.
+   * This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`.
+   * 
+ * + * string label_group = 4; + */ + com.google.protobuf.ByteString getLabelGroupBytes(); + + /** + * + * + *
+   * Optional. The Language of this question, as a
+   * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+   * Default value is en-US.
+   * Only need to set this when task is language related. For example, French
+   * text classification or Chinese audio transcription.
+   * 
+ * + * string language_code = 5; + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Optional. The Language of this question, as a
+   * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
+   * Default value is en-US.
+   * Only need to set this when task is language related. For example, French
+   * text classification or Chinese audio transcription.
+   * 
+ * + * string language_code = 5; + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * Optional. Replication of questions. Each question will be sent to up to
+   * this number of contributors to label. Aggregated answers will be returned.
+   * Default is set to 1.
+   * For image related labeling, valid values are 1, 3, 5.
+   * 
+ * + * int32 replica_count = 6; + */ + int getReplicaCount(); + + /** + * + * + *
+   * Optional. Maximum duration for contributors to answer a question. Default
+   * is 1800 seconds.
+   * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + boolean hasQuestionDuration(); + /** + * + * + *
+   * Optional. Maximum duration for contributors to answer a question. Default
+   * is 1800 seconds.
+   * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + com.google.protobuf.Duration getQuestionDuration(); + /** + * + * + *
+   * Optional. Maximum duration for contributors to answer a question. Default
+   * is 1800 seconds.
+   * 
+ * + * .google.protobuf.Duration question_duration = 7; + */ + com.google.protobuf.DurationOrBuilder getQuestionDurationOrBuilder(); + + /** + * + * + *
+   * Optional. If you want your own labeling contributors to manage and work on
+   * this labeling request, you can set these contributors here. We will give
+   * them access to the question types in crowdcompute. Note that these
+   * emails must be registered in crowdcompute worker UI:
+   * https://crowd-compute.appspot.com/
+   * 
+ * + * repeated string contributor_emails = 9; + */ + java.util.List getContributorEmailsList(); + /** + * + * + *
+   * Optional. If you want your own labeling contributors to manage and work on
+   * this labeling request, you can set these contributors here. We will give
+   * them access to the question types in crowdcompute. Note that these
+   * emails must be registered in crowdcompute worker UI:
+   * https://crowd-compute.appspot.com/
+   * 
+ * + * repeated string contributor_emails = 9; + */ + int getContributorEmailsCount(); + /** + * + * + *
+   * Optional. If you want your own labeling contributors to manage and work on
+   * this labeling request, you can set these contributors here. We will give
+   * them access to the question types in crowdcompute. Note that these
+   * emails must be registered in crowdcompute worker UI:
+   * https://crowd-compute.appspot.com/
+   * 
+ * + * repeated string contributor_emails = 9; + */ + java.lang.String getContributorEmails(int index); + /** + * + * + *
+   * Optional. If you want your own labeling contributors to manage and work on
+   * this labeling request, you can set these contributors here. We will give
+   * them access to the question types in crowdcompute. Note that these
+   * emails must be registered in crowdcompute worker UI:
+   * https://crowd-compute.appspot.com/
+   * 
+ * + * repeated string contributor_emails = 9; + */ + com.google.protobuf.ByteString getContributorEmailsBytes(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/HumanAnnotationConfigOuterClass.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/HumanAnnotationConfigOuterClass.java new file mode 100644 index 000000000000..2dcda977b0de --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/HumanAnnotationConfigOuterClass.java @@ -0,0 +1,257 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public final class HumanAnnotationConfigOuterClass { + private HumanAnnotationConfigOuterClass() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_HumanAnnotationConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_HumanAnnotationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_BoundingPolyConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_BoundingPolyConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_PolylineConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_PolylineConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_SegmentationConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_SegmentationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_AnnotationSpecSetConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_AnnotationSpecSetConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ObjectDetectionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ObjectDetectionConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_EventConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_EventConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_TextClassificationConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_TextClassificationConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_SentimentConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_SentimentConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_TextEntityExtractionConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_TextEntityExtractionConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n?google/cloud/datalabeling/v1beta1/huma" + + "n_annotation_config.proto\022!google.cloud." + + "datalabeling.v1beta1\032\036google/protobuf/du" + + "ration.proto\032\034google/api/annotations.pro" + + "to\"\220\002\n\025HumanAnnotationConfig\022\023\n\013instruct" + + "ion\030\001 \001(\t\022&\n\036annotated_dataset_display_n" + + "ame\030\002 \001(\t\022%\n\035annotated_dataset_descripti" + + "on\030\003 \001(\t\022\023\n\013label_group\030\004 \001(\t\022\025\n\rlanguag" + + "e_code\030\005 \001(\t\022\025\n\rreplica_count\030\006 \001(\005\0224\n\021q" + + "uestion_duration\030\007 \001(\0132\031.google.protobuf" + + ".Duration\022\032\n\022contributor_emails\030\t \003(\t\"\256\001" + + "\n\031ImageClassificationConfig\022\033\n\023annotatio" + + "n_spec_set\030\001 \001(\t\022\031\n\021allow_multi_label\030\002 " + + "\001(\010\022Y\n\027answer_aggregation_type\030\003 \001(\01628.g" + + "oogle.cloud.datalabeling.v1beta1.StringA" + + "ggregationType\"N\n\022BoundingPolyConfig\022\033\n\023" + + "annotation_spec_set\030\001 \001(\t\022\033\n\023instruction" + + "_message\030\002 \001(\t\"J\n\016PolylineConfig\022\033\n\023anno" + + "tation_spec_set\030\001 \001(\t\022\033\n\023instruction_mes" + + "sage\030\002 \001(\t\"N\n\022SegmentationConfig\022\033\n\023anno" + + "tation_spec_set\030\001 \001(\t\022\033\n\023instruction_mes" + + "sage\030\002 \001(\t\"\207\002\n\031VideoClassificationConfig" + + "\022y\n\033annotation_spec_set_configs\030\001 \003(\0132T." + + "google.cloud.datalabeling.v1beta1.VideoC" + + "lassificationConfig.AnnotationSpecSetCon" + + "fig\022\034\n\024apply_shot_detection\030\002 \001(\010\032Q\n\027Ann" + + "otationSpecSetConfig\022\033\n\023annotation_spec_" + + "set\030\001 \001(\t\022\031\n\021allow_multi_label\030\002 \001(\010\"p\n\025" + + "ObjectDetectionConfig\022\033\n\023annotation_spec" + + "_set\030\001 \001(\t\022\033\n\023instruction_message\030\002 \001(\t\022" + + "\035\n\025extraction_frame_rate\030\003 \001(\001\"3\n\024Object" + + "TrackingConfig\022\033\n\023annotation_spec_set\030\001 " + + "\001(\t\"+\n\013EventConfig\022\034\n\024annotation_spec_se" + + "ts\030\001 \003(\t\"\240\001\n\030TextClassificationConfig\022\031\n" + + "\021allow_multi_label\030\001 \001(\010\022\033\n\023annotation_s" + + "pec_set\030\002 \001(\t\022L\n\020sentiment_config\030\003 \001(\0132" + + "2.google.cloud.datalabeling.v1beta1.Sent" + + "imentConfig\";\n\017SentimentConfig\022(\n enable" + + "_label_sentiment_selection\030\001 \001(\010\"9\n\032Text" + + "EntityExtractionConfig\022\033\n\023annotation_spe" + + "c_set\030\001 \001(\t*{\n\025StringAggregationType\022\'\n#" + + "STRING_AGGREGATION_TYPE_UNSPECIFIED\020\000\022\021\n" + + "\rMAJORITY_VOTE\020\001\022\022\n\016UNANIMOUS_VOTE\020\002\022\022\n\016" + + "NO_AGGREGATION\020\003Bx\n%com.google.cloud.dat" + + "alabeling.v1beta1P\001ZMgoogle.golang.org/g" + + "enproto/googleapis/cloud/datalabeling/v1" + + "beta1;datalabelingb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.DurationProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }, + assigner); + internal_static_google_cloud_datalabeling_v1beta1_HumanAnnotationConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datalabeling_v1beta1_HumanAnnotationConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_HumanAnnotationConfig_descriptor, + new java.lang.String[] { + "Instruction", + "AnnotatedDatasetDisplayName", + "AnnotatedDatasetDescription", + "LabelGroup", + "LanguageCode", + "ReplicaCount", + "QuestionDuration", + "ContributorEmails", + }); + internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationConfig_descriptor, + new java.lang.String[] { + "AnnotationSpecSet", "AllowMultiLabel", "AnswerAggregationType", + }); + internal_static_google_cloud_datalabeling_v1beta1_BoundingPolyConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datalabeling_v1beta1_BoundingPolyConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_BoundingPolyConfig_descriptor, + new java.lang.String[] { + "AnnotationSpecSet", "InstructionMessage", + }); + internal_static_google_cloud_datalabeling_v1beta1_PolylineConfig_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_datalabeling_v1beta1_PolylineConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_PolylineConfig_descriptor, + new java.lang.String[] { + "AnnotationSpecSet", "InstructionMessage", + }); + internal_static_google_cloud_datalabeling_v1beta1_SegmentationConfig_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_datalabeling_v1beta1_SegmentationConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_SegmentationConfig_descriptor, + new java.lang.String[] { + "AnnotationSpecSet", "InstructionMessage", + }); + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_descriptor, + new java.lang.String[] { + "AnnotationSpecSetConfigs", "ApplyShotDetection", + }); + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_AnnotationSpecSetConfig_descriptor = + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_AnnotationSpecSetConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_AnnotationSpecSetConfig_descriptor, + new java.lang.String[] { + "AnnotationSpecSet", "AllowMultiLabel", + }); + internal_static_google_cloud_datalabeling_v1beta1_ObjectDetectionConfig_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_datalabeling_v1beta1_ObjectDetectionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ObjectDetectionConfig_descriptor, + new java.lang.String[] { + "AnnotationSpecSet", "InstructionMessage", "ExtractionFrameRate", + }); + internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingConfig_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingConfig_descriptor, + new java.lang.String[] { + "AnnotationSpecSet", + }); + internal_static_google_cloud_datalabeling_v1beta1_EventConfig_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_datalabeling_v1beta1_EventConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_EventConfig_descriptor, + new java.lang.String[] { + "AnnotationSpecSets", + }); + internal_static_google_cloud_datalabeling_v1beta1_TextClassificationConfig_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_datalabeling_v1beta1_TextClassificationConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_TextClassificationConfig_descriptor, + new java.lang.String[] { + "AllowMultiLabel", "AnnotationSpecSet", "SentimentConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_SentimentConfig_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_datalabeling_v1beta1_SentimentConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_SentimentConfig_descriptor, + new java.lang.String[] { + "EnableLabelSentimentSelection", + }); + internal_static_google_cloud_datalabeling_v1beta1_TextEntityExtractionConfig_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_datalabeling_v1beta1_TextEntityExtractionConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_TextEntityExtractionConfig_descriptor, + new java.lang.String[] { + "AnnotationSpecSet", + }); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageBoundingPolyAnnotation.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageBoundingPolyAnnotation.java new file mode 100644 index 000000000000..1621c4988e98 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageBoundingPolyAnnotation.java @@ -0,0 +1,1231 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Image bounding poly annotation. It represents a polygon including
+ * bounding box in the image.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} + */ +public final class ImageBoundingPolyAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) + ImageBoundingPolyAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageBoundingPolyAnnotation.newBuilder() to construct. + private ImageBoundingPolyAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageBoundingPolyAnnotation() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageBoundingPolyAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder subBuilder = null; + if (annotationSpec_ != null) { + subBuilder = annotationSpec_.toBuilder(); + } + annotationSpec_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationSpec_); + annotationSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder subBuilder = null; + if (boundedAreaCase_ == 2) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_).toBuilder(); + } + boundedArea_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.BoundingPoly.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_); + boundedArea_ = subBuilder.buildPartial(); + } + boundedAreaCase_ = 2; + break; + } + case 26: + { + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder subBuilder = + null; + if (boundedAreaCase_ == 3) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_) + .toBuilder(); + } + boundedArea_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_); + boundedArea_ = subBuilder.buildPartial(); + } + boundedAreaCase_ = 3; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageBoundingPolyAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageBoundingPolyAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.class, + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.Builder.class); + } + + private int boundedAreaCase_ = 0; + private java.lang.Object boundedArea_; + + public enum BoundedAreaCase implements com.google.protobuf.Internal.EnumLite { + BOUNDING_POLY(2), + NORMALIZED_BOUNDING_POLY(3), + BOUNDEDAREA_NOT_SET(0); + private final int value; + + private BoundedAreaCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static BoundedAreaCase valueOf(int value) { + return forNumber(value); + } + + public static BoundedAreaCase forNumber(int value) { + switch (value) { + case 2: + return BOUNDING_POLY; + case 3: + return NORMALIZED_BOUNDING_POLY; + case 0: + return BOUNDEDAREA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BoundedAreaCase getBoundedAreaCase() { + return BoundedAreaCase.forNumber(boundedAreaCase_); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 2; + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + public boolean hasBoundingPoly() { + return boundedAreaCase_ == 2; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + public com.google.cloud.datalabeling.v1beta1.BoundingPoly getBoundingPoly() { + if (boundedAreaCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundedAreaCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } + + public static final int NORMALIZED_BOUNDING_POLY_FIELD_NUMBER = 3; + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + public boolean hasNormalizedBoundingPoly() { + return boundedAreaCase_ == 3; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly getNormalizedBoundingPoly() { + if (boundedAreaCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder + getNormalizedBoundingPolyOrBuilder() { + if (boundedAreaCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } + + public static final int ANNOTATION_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + /** + * + * + *
+   * Label of object in this bounding polygon.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpec_ != null; + } + /** + * + * + *
+   * Label of object in this bounding polygon.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + /** + * + * + *
+   * Label of object in this bounding polygon.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + return getAnnotationSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (annotationSpec_ != null) { + output.writeMessage(1, getAnnotationSpec()); + } + if (boundedAreaCase_ == 2) { + output.writeMessage(2, (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_); + } + if (boundedAreaCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (annotationSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnnotationSpec()); + } + if (boundedAreaCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_); + } + if (boundedAreaCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation other = + (com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) obj; + + if (hasAnnotationSpec() != other.hasAnnotationSpec()) return false; + if (hasAnnotationSpec()) { + if (!getAnnotationSpec().equals(other.getAnnotationSpec())) return false; + } + if (!getBoundedAreaCase().equals(other.getBoundedAreaCase())) return false; + switch (boundedAreaCase_) { + case 2: + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; + break; + case 3: + if (!getNormalizedBoundingPoly().equals(other.getNormalizedBoundingPoly())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnnotationSpec()) { + hash = (37 * hash) + ANNOTATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpec().hashCode(); + } + switch (boundedAreaCase_) { + case 2: + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + break; + case 3: + hash = (37 * hash) + NORMALIZED_BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedBoundingPoly().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Image bounding poly annotation. It represents a polygon including
+   * bounding box in the image.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageBoundingPolyAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageBoundingPolyAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.class, + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + boundedAreaCase_ = 0; + boundedArea_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageBoundingPolyAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation build() { + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation buildPartial() { + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation result = + new com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation(this); + if (boundedAreaCase_ == 2) { + if (boundingPolyBuilder_ == null) { + result.boundedArea_ = boundedArea_; + } else { + result.boundedArea_ = boundingPolyBuilder_.build(); + } + } + if (boundedAreaCase_ == 3) { + if (normalizedBoundingPolyBuilder_ == null) { + result.boundedArea_ = boundedArea_; + } else { + result.boundedArea_ = normalizedBoundingPolyBuilder_.build(); + } + } + if (annotationSpecBuilder_ == null) { + result.annotationSpec_ = annotationSpec_; + } else { + result.annotationSpec_ = annotationSpecBuilder_.build(); + } + result.boundedAreaCase_ = boundedAreaCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.getDefaultInstance()) + return this; + if (other.hasAnnotationSpec()) { + mergeAnnotationSpec(other.getAnnotationSpec()); + } + switch (other.getBoundedAreaCase()) { + case BOUNDING_POLY: + { + mergeBoundingPoly(other.getBoundingPoly()); + break; + } + case NORMALIZED_BOUNDING_POLY: + { + mergeNormalizedBoundingPoly(other.getNormalizedBoundingPoly()); + break; + } + case BOUNDEDAREA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int boundedAreaCase_ = 0; + private java.lang.Object boundedArea_; + + public BoundedAreaCase getBoundedAreaCase() { + return BoundedAreaCase.forNumber(boundedAreaCase_); + } + + public Builder clearBoundedArea() { + boundedAreaCase_ = 0; + boundedArea_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPoly, + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder> + boundingPolyBuilder_; + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + public boolean hasBoundingPoly() { + return boundedAreaCase_ == 2; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + public com.google.cloud.datalabeling.v1beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } else { + if (boundedAreaCase_ == 2) { + return boundingPolyBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + public Builder setBoundingPoly(com.google.cloud.datalabeling.v1beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundedArea_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + boundedAreaCase_ = 2; + return this; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + public Builder setBoundingPoly( + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundedArea_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + boundedAreaCase_ = 2; + return this; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + public Builder mergeBoundingPoly(com.google.cloud.datalabeling.v1beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 2 + && boundedArea_ + != com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance()) { + boundedArea_ = + com.google.cloud.datalabeling.v1beta1.BoundingPoly.newBuilder( + (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_) + .mergeFrom(value) + .buildPartial(); + } else { + boundedArea_ = value; + } + onChanged(); + } else { + if (boundedAreaCase_ == 2) { + boundingPolyBuilder_.mergeFrom(value); + } + boundingPolyBuilder_.setMessage(value); + } + boundedAreaCase_ = 2; + return this; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 2) { + boundedAreaCase_ = 0; + boundedArea_ = null; + onChanged(); + } + } else { + if (boundedAreaCase_ == 2) { + boundedAreaCase_ = 0; + boundedArea_ = null; + } + boundingPolyBuilder_.clear(); + } + return this; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + public com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if ((boundedAreaCase_ == 2) && (boundingPolyBuilder_ != null)) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + if (boundedAreaCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPoly, + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + if (!(boundedAreaCase_ == 2)) { + boundedArea_ = com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } + boundingPolyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPoly, + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_, + getParentForChildren(), + isClean()); + boundedArea_ = null; + } + boundedAreaCase_ = 2; + onChanged(); + ; + return boundingPolyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder> + normalizedBoundingPolyBuilder_; + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + public boolean hasNormalizedBoundingPoly() { + return boundedAreaCase_ == 3; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + getNormalizedBoundingPoly() { + if (normalizedBoundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } else { + if (boundedAreaCase_ == 3) { + return normalizedBoundingPolyBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + public Builder setNormalizedBoundingPoly( + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly value) { + if (normalizedBoundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundedArea_ = value; + onChanged(); + } else { + normalizedBoundingPolyBuilder_.setMessage(value); + } + boundedAreaCase_ = 3; + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + public Builder setNormalizedBoundingPoly( + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder builderForValue) { + if (normalizedBoundingPolyBuilder_ == null) { + boundedArea_ = builderForValue.build(); + onChanged(); + } else { + normalizedBoundingPolyBuilder_.setMessage(builderForValue.build()); + } + boundedAreaCase_ = 3; + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + public Builder mergeNormalizedBoundingPoly( + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly value) { + if (normalizedBoundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 3 + && boundedArea_ + != com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + .getDefaultInstance()) { + boundedArea_ = + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.newBuilder( + (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_) + .mergeFrom(value) + .buildPartial(); + } else { + boundedArea_ = value; + } + onChanged(); + } else { + if (boundedAreaCase_ == 3) { + normalizedBoundingPolyBuilder_.mergeFrom(value); + } + normalizedBoundingPolyBuilder_.setMessage(value); + } + boundedAreaCase_ = 3; + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + public Builder clearNormalizedBoundingPoly() { + if (normalizedBoundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 3) { + boundedAreaCase_ = 0; + boundedArea_ = null; + onChanged(); + } + } else { + if (boundedAreaCase_ == 3) { + boundedAreaCase_ = 0; + boundedArea_ = null; + } + normalizedBoundingPolyBuilder_.clear(); + } + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder + getNormalizedBoundingPolyBuilder() { + return getNormalizedBoundingPolyFieldBuilder().getBuilder(); + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder + getNormalizedBoundingPolyOrBuilder() { + if ((boundedAreaCase_ == 3) && (normalizedBoundingPolyBuilder_ != null)) { + return normalizedBoundingPolyBuilder_.getMessageOrBuilder(); + } else { + if (boundedAreaCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder> + getNormalizedBoundingPolyFieldBuilder() { + if (normalizedBoundingPolyBuilder_ == null) { + if (!(boundedAreaCase_ == 3)) { + boundedArea_ = + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } + normalizedBoundingPolyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_, + getParentForChildren(), + isClean()); + boundedArea_ = null; + } + boundedAreaCase_ = 3; + onChanged(); + ; + return normalizedBoundingPolyBuilder_; + } + + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + annotationSpecBuilder_; + /** + * + * + *
+     * Label of object in this bounding polygon.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpecBuilder_ != null || annotationSpec_ != null; + } + /** + * + * + *
+     * Label of object in this bounding polygon.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } else { + return annotationSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Label of object in this bounding polygon.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationSpec_ = value; + onChanged(); + } else { + annotationSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Label of object in this bounding polygon.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder builderForValue) { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = builderForValue.build(); + onChanged(); + } else { + annotationSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Label of object in this bounding polygon.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder mergeAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (annotationSpec_ != null) { + annotationSpec_ = + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.newBuilder(annotationSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationSpec_ = value; + } + onChanged(); + } else { + annotationSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Label of object in this bounding polygon.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder clearAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + onChanged(); + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Label of object in this bounding polygon.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder getAnnotationSpecBuilder() { + + onChanged(); + return getAnnotationSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Label of object in this bounding polygon.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + if (annotationSpecBuilder_ != null) { + return annotationSpecBuilder_.getMessageOrBuilder(); + } else { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + } + /** + * + * + *
+     * Label of object in this bounding polygon.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + getAnnotationSpecFieldBuilder() { + if (annotationSpecBuilder_ == null) { + annotationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>( + getAnnotationSpec(), getParentForChildren(), isClean()); + annotationSpec_ = null; + } + return annotationSpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) + private static final com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation(); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageBoundingPolyAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageBoundingPolyAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageBoundingPolyAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageBoundingPolyAnnotationOrBuilder.java new file mode 100644 index 000000000000..350e2b5cbf87 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageBoundingPolyAnnotationOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ImageBoundingPolyAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + boolean hasBoundingPoly(); + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + com.google.cloud.datalabeling.v1beta1.BoundingPoly getBoundingPoly(); + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 2; */ + com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + boolean hasNormalizedBoundingPoly(); + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly getNormalizedBoundingPoly(); + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 3; + * + */ + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder + getNormalizedBoundingPolyOrBuilder(); + + /** + * + * + *
+   * Label of object in this bounding polygon.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + boolean hasAnnotationSpec(); + /** + * + * + *
+   * Label of object in this bounding polygon.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec(); + /** + * + * + *
+   * Label of object in this bounding polygon.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder getAnnotationSpecOrBuilder(); + + public com.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.BoundedAreaCase + getBoundedAreaCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationAnnotation.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationAnnotation.java new file mode 100644 index 000000000000..ea37d0a3adc1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationAnnotation.java @@ -0,0 +1,718 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Image classification annotation definition.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} + */ +public final class ImageClassificationAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) + ImageClassificationAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageClassificationAnnotation.newBuilder() to construct. + private ImageClassificationAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageClassificationAnnotation() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageClassificationAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder subBuilder = null; + if (annotationSpec_ != null) { + subBuilder = annotationSpec_.toBuilder(); + } + annotationSpec_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationSpec_); + annotationSpec_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.class, + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.Builder.class); + } + + public static final int ANNOTATION_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + /** + * + * + *
+   * Label of image.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpec_ != null; + } + /** + * + * + *
+   * Label of image.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + /** + * + * + *
+   * Label of image.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + return getAnnotationSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (annotationSpec_ != null) { + output.writeMessage(1, getAnnotationSpec()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (annotationSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnnotationSpec()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation other = + (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) obj; + + if (hasAnnotationSpec() != other.hasAnnotationSpec()) return false; + if (hasAnnotationSpec()) { + if (!getAnnotationSpec().equals(other.getAnnotationSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnnotationSpec()) { + hash = (37 * hash) + ANNOTATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Image classification annotation definition.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.class, + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation build() { + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation buildPartial() { + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation result = + new com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation(this); + if (annotationSpecBuilder_ == null) { + result.annotationSpec_ = annotationSpec_; + } else { + result.annotationSpec_ = annotationSpecBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + .getDefaultInstance()) return this; + if (other.hasAnnotationSpec()) { + mergeAnnotationSpec(other.getAnnotationSpec()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + annotationSpecBuilder_; + /** + * + * + *
+     * Label of image.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpecBuilder_ != null || annotationSpec_ != null; + } + /** + * + * + *
+     * Label of image.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } else { + return annotationSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Label of image.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationSpec_ = value; + onChanged(); + } else { + annotationSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Label of image.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder builderForValue) { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = builderForValue.build(); + onChanged(); + } else { + annotationSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Label of image.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder mergeAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (annotationSpec_ != null) { + annotationSpec_ = + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.newBuilder(annotationSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationSpec_ = value; + } + onChanged(); + } else { + annotationSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Label of image.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder clearAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + onChanged(); + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Label of image.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder getAnnotationSpecBuilder() { + + onChanged(); + return getAnnotationSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Label of image.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + if (annotationSpecBuilder_ != null) { + return annotationSpecBuilder_.getMessageOrBuilder(); + } else { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + } + /** + * + * + *
+     * Label of image.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + getAnnotationSpecFieldBuilder() { + if (annotationSpecBuilder_ == null) { + annotationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>( + getAnnotationSpec(), getParentForChildren(), isClean()); + annotationSpec_ = null; + } + return annotationSpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) + private static final com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation(); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageClassificationAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageClassificationAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationAnnotationOrBuilder.java new file mode 100644 index 000000000000..cfcf5cff37ac --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationAnnotationOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ImageClassificationAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Label of image.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + boolean hasAnnotationSpec(); + /** + * + * + *
+   * Label of image.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec(); + /** + * + * + *
+   * Label of image.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder getAnnotationSpecOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationConfig.java new file mode 100644 index 000000000000..5c1a04630f56 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationConfig.java @@ -0,0 +1,837 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Config for image classification human labeling task.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImageClassificationConfig} + */ +public final class ImageClassificationConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + ImageClassificationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageClassificationConfig.newBuilder() to construct. + private ImageClassificationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageClassificationConfig() { + annotationSpecSet_ = ""; + answerAggregationType_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageClassificationConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationSpecSet_ = s; + break; + } + case 16: + { + allowMultiLabel_ = input.readBool(); + break; + } + case 24: + { + int rawValue = input.readEnum(); + + answerAggregationType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.class, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder.class); + } + + public static final int ANNOTATION_SPEC_SET_FIELD_NUMBER = 1; + private volatile java.lang.Object annotationSpecSet_; + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MULTI_LABEL_FIELD_NUMBER = 2; + private boolean allowMultiLabel_; + /** + * + * + *
+   * Optional. If allow_multi_label is true, contributors are able to choose
+   * multiple labels for one image.
+   * 
+ * + * bool allow_multi_label = 2; + */ + public boolean getAllowMultiLabel() { + return allowMultiLabel_; + } + + public static final int ANSWER_AGGREGATION_TYPE_FIELD_NUMBER = 3; + private int answerAggregationType_; + /** + * + * + *
+   * Optional. The type of how to aggregate answers.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.StringAggregationType answer_aggregation_type = 3; + * + */ + public int getAnswerAggregationTypeValue() { + return answerAggregationType_; + } + /** + * + * + *
+   * Optional. The type of how to aggregate answers.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.StringAggregationType answer_aggregation_type = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.StringAggregationType getAnswerAggregationType() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.StringAggregationType result = + com.google.cloud.datalabeling.v1beta1.StringAggregationType.valueOf(answerAggregationType_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.StringAggregationType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAnnotationSpecSetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecSet_); + } + if (allowMultiLabel_ != false) { + output.writeBool(2, allowMultiLabel_); + } + if (answerAggregationType_ + != com.google.cloud.datalabeling.v1beta1.StringAggregationType + .STRING_AGGREGATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, answerAggregationType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAnnotationSpecSetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotationSpecSet_); + } + if (allowMultiLabel_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowMultiLabel_); + } + if (answerAggregationType_ + != com.google.cloud.datalabeling.v1beta1.StringAggregationType + .STRING_AGGREGATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, answerAggregationType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig other = + (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) obj; + + if (!getAnnotationSpecSet().equals(other.getAnnotationSpecSet())) return false; + if (getAllowMultiLabel() != other.getAllowMultiLabel()) return false; + if (answerAggregationType_ != other.answerAggregationType_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANNOTATION_SPEC_SET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSet().hashCode(); + hash = (37 * hash) + ALLOW_MULTI_LABEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMultiLabel()); + hash = (37 * hash) + ANSWER_AGGREGATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + answerAggregationType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for image classification human labeling task.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImageClassificationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.class, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + annotationSpecSet_ = ""; + + allowMultiLabel_ = false; + + answerAggregationType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageClassificationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig build() { + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig result = + new com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig(this); + result.annotationSpecSet_ = annotationSpecSet_; + result.allowMultiLabel_ = allowMultiLabel_; + result.answerAggregationType_ = answerAggregationType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance()) + return this; + if (!other.getAnnotationSpecSet().isEmpty()) { + annotationSpecSet_ = other.annotationSpecSet_; + onChanged(); + } + if (other.getAllowMultiLabel() != false) { + setAllowMultiLabel(other.getAllowMultiLabel()); + } + if (other.answerAggregationType_ != 0) { + setAnswerAggregationTypeValue(other.getAnswerAggregationTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object annotationSpecSet_ = ""; + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSpecSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder clearAnnotationSpecSet() { + + annotationSpecSet_ = getDefaultInstance().getAnnotationSpecSet(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationSpecSet_ = value; + onChanged(); + return this; + } + + private boolean allowMultiLabel_; + /** + * + * + *
+     * Optional. If allow_multi_label is true, contributors are able to choose
+     * multiple labels for one image.
+     * 
+ * + * bool allow_multi_label = 2; + */ + public boolean getAllowMultiLabel() { + return allowMultiLabel_; + } + /** + * + * + *
+     * Optional. If allow_multi_label is true, contributors are able to choose
+     * multiple labels for one image.
+     * 
+ * + * bool allow_multi_label = 2; + */ + public Builder setAllowMultiLabel(boolean value) { + + allowMultiLabel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If allow_multi_label is true, contributors are able to choose
+     * multiple labels for one image.
+     * 
+ * + * bool allow_multi_label = 2; + */ + public Builder clearAllowMultiLabel() { + + allowMultiLabel_ = false; + onChanged(); + return this; + } + + private int answerAggregationType_ = 0; + /** + * + * + *
+     * Optional. The type of how to aggregate answers.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.StringAggregationType answer_aggregation_type = 3; + * + */ + public int getAnswerAggregationTypeValue() { + return answerAggregationType_; + } + /** + * + * + *
+     * Optional. The type of how to aggregate answers.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.StringAggregationType answer_aggregation_type = 3; + * + */ + public Builder setAnswerAggregationTypeValue(int value) { + answerAggregationType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of how to aggregate answers.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.StringAggregationType answer_aggregation_type = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.StringAggregationType getAnswerAggregationType() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.StringAggregationType result = + com.google.cloud.datalabeling.v1beta1.StringAggregationType.valueOf( + answerAggregationType_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.StringAggregationType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The type of how to aggregate answers.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.StringAggregationType answer_aggregation_type = 3; + * + */ + public Builder setAnswerAggregationType( + com.google.cloud.datalabeling.v1beta1.StringAggregationType value) { + if (value == null) { + throw new NullPointerException(); + } + + answerAggregationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The type of how to aggregate answers.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.StringAggregationType answer_aggregation_type = 3; + * + */ + public Builder clearAnswerAggregationType() { + + answerAggregationType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + private static final com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageClassificationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageClassificationConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationConfigOrBuilder.java new file mode 100644 index 000000000000..77eedc91498c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageClassificationConfigOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ImageClassificationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + java.lang.String getAnnotationSpecSet(); + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + com.google.protobuf.ByteString getAnnotationSpecSetBytes(); + + /** + * + * + *
+   * Optional. If allow_multi_label is true, contributors are able to choose
+   * multiple labels for one image.
+   * 
+ * + * bool allow_multi_label = 2; + */ + boolean getAllowMultiLabel(); + + /** + * + * + *
+   * Optional. The type of how to aggregate answers.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.StringAggregationType answer_aggregation_type = 3; + * + */ + int getAnswerAggregationTypeValue(); + /** + * + * + *
+   * Optional. The type of how to aggregate answers.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.StringAggregationType answer_aggregation_type = 3; + * + */ + com.google.cloud.datalabeling.v1beta1.StringAggregationType getAnswerAggregationType(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePayload.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePayload.java new file mode 100644 index 000000000000..6f77fd7c6613 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePayload.java @@ -0,0 +1,842 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Container of information about an image.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImagePayload} + */ +public final class ImagePayload extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ImagePayload) + ImagePayloadOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImagePayload.newBuilder() to construct. + private ImagePayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImagePayload() { + mimeType_ = ""; + imageThumbnail_ = com.google.protobuf.ByteString.EMPTY; + imageUri_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImagePayload( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 18: + { + imageThumbnail_ = input.readBytes(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + imageUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImagePayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImagePayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImagePayload.class, + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder.class); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object mimeType_; + /** + * + * + *
+   * Image format.
+   * 
+ * + * string mime_type = 1; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + * + * + *
+   * Image format.
+   * 
+ * + * string mime_type = 1; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_THUMBNAIL_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString imageThumbnail_; + /** + * + * + *
+   * A byte string of a full image.
+   * 
+ * + * bytes image_thumbnail = 2; + */ + public com.google.protobuf.ByteString getImageThumbnail() { + return imageThumbnail_; + } + + public static final int IMAGE_URI_FIELD_NUMBER = 3; + private volatile java.lang.Object imageUri_; + /** + * + * + *
+   * Image uri from the user bucket.
+   * 
+ * + * string image_uri = 3; + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } + } + /** + * + * + *
+   * Image uri from the user bucket.
+   * 
+ * + * string image_uri = 3; + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getMimeTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mimeType_); + } + if (!imageThumbnail_.isEmpty()) { + output.writeBytes(2, imageThumbnail_); + } + if (!getImageUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMimeTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mimeType_); + } + if (!imageThumbnail_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(2, imageThumbnail_); + } + if (!getImageUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, imageUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ImagePayload)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ImagePayload other = + (com.google.cloud.datalabeling.v1beta1.ImagePayload) obj; + + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getImageThumbnail().equals(other.getImageThumbnail())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + IMAGE_THUMBNAIL_FIELD_NUMBER; + hash = (53 * hash) + getImageThumbnail().hashCode(); + hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; + hash = (53 * hash) + getImageUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.ImagePayload prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Container of information about an image.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImagePayload} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ImagePayload) + com.google.cloud.datalabeling.v1beta1.ImagePayloadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImagePayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImagePayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImagePayload.class, + com.google.cloud.datalabeling.v1beta1.ImagePayload.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ImagePayload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + mimeType_ = ""; + + imageThumbnail_ = com.google.protobuf.ByteString.EMPTY; + + imageUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImagePayload_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImagePayload getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImagePayload build() { + com.google.cloud.datalabeling.v1beta1.ImagePayload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImagePayload buildPartial() { + com.google.cloud.datalabeling.v1beta1.ImagePayload result = + new com.google.cloud.datalabeling.v1beta1.ImagePayload(this); + result.mimeType_ = mimeType_; + result.imageThumbnail_ = imageThumbnail_; + result.imageUri_ = imageUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ImagePayload) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ImagePayload) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ImagePayload other) { + if (other == com.google.cloud.datalabeling.v1beta1.ImagePayload.getDefaultInstance()) + return this; + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + if (other.getImageThumbnail() != com.google.protobuf.ByteString.EMPTY) { + setImageThumbnail(other.getImageThumbnail()); + } + if (!other.getImageUri().isEmpty()) { + imageUri_ = other.imageUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ImagePayload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ImagePayload) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object mimeType_ = ""; + /** + * + * + *
+     * Image format.
+     * 
+ * + * string mime_type = 1; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Image format.
+     * 
+ * + * string mime_type = 1; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Image format.
+     * 
+ * + * string mime_type = 1; + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Image format.
+     * 
+ * + * string mime_type = 1; + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Image format.
+     * 
+ * + * string mime_type = 1; + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString imageThumbnail_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * A byte string of a full image.
+     * 
+ * + * bytes image_thumbnail = 2; + */ + public com.google.protobuf.ByteString getImageThumbnail() { + return imageThumbnail_; + } + /** + * + * + *
+     * A byte string of a full image.
+     * 
+ * + * bytes image_thumbnail = 2; + */ + public Builder setImageThumbnail(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + imageThumbnail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A byte string of a full image.
+     * 
+ * + * bytes image_thumbnail = 2; + */ + public Builder clearImageThumbnail() { + + imageThumbnail_ = getDefaultInstance().getImageThumbnail(); + onChanged(); + return this; + } + + private java.lang.Object imageUri_ = ""; + /** + * + * + *
+     * Image uri from the user bucket.
+     * 
+ * + * string image_uri = 3; + */ + public java.lang.String getImageUri() { + java.lang.Object ref = imageUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Image uri from the user bucket.
+     * 
+ * + * string image_uri = 3; + */ + public com.google.protobuf.ByteString getImageUriBytes() { + java.lang.Object ref = imageUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + imageUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Image uri from the user bucket.
+     * 
+ * + * string image_uri = 3; + */ + public Builder setImageUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Image uri from the user bucket.
+     * 
+ * + * string image_uri = 3; + */ + public Builder clearImageUri() { + + imageUri_ = getDefaultInstance().getImageUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Image uri from the user bucket.
+     * 
+ * + * string image_uri = 3; + */ + public Builder setImageUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ImagePayload) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ImagePayload) + private static final com.google.cloud.datalabeling.v1beta1.ImagePayload DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ImagePayload(); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePayload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImagePayload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImagePayload(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImagePayload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePayloadOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePayloadOrBuilder.java new file mode 100644 index 000000000000..b2db6ecff2c2 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePayloadOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ImagePayloadOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ImagePayload) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Image format.
+   * 
+ * + * string mime_type = 1; + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * Image format.
+   * 
+ * + * string mime_type = 1; + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * A byte string of a full image.
+   * 
+ * + * bytes image_thumbnail = 2; + */ + com.google.protobuf.ByteString getImageThumbnail(); + + /** + * + * + *
+   * Image uri from the user bucket.
+   * 
+ * + * string image_uri = 3; + */ + java.lang.String getImageUri(); + /** + * + * + *
+   * Image uri from the user bucket.
+   * 
+ * + * string image_uri = 3; + */ + com.google.protobuf.ByteString getImageUriBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePolylineAnnotation.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePolylineAnnotation.java new file mode 100644 index 000000000000..f772cac60a98 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePolylineAnnotation.java @@ -0,0 +1,1196 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * A polyline for the image annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} + */ +public final class ImagePolylineAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) + ImagePolylineAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImagePolylineAnnotation.newBuilder() to construct. + private ImagePolylineAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImagePolylineAnnotation() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImagePolylineAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder subBuilder = null; + if (annotationSpec_ != null) { + subBuilder = annotationSpec_.toBuilder(); + } + annotationSpec_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationSpec_); + annotationSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.Polyline.Builder subBuilder = null; + if (polyCase_ == 2) { + subBuilder = ((com.google.cloud.datalabeling.v1beta1.Polyline) poly_).toBuilder(); + } + poly_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.Polyline.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datalabeling.v1beta1.Polyline) poly_); + poly_ = subBuilder.buildPartial(); + } + polyCase_ = 2; + break; + } + case 26: + { + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.Builder subBuilder = null; + if (polyCase_ == 3) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) poly_).toBuilder(); + } + poly_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) poly_); + poly_ = subBuilder.buildPartial(); + } + polyCase_ = 3; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImagePolylineAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImagePolylineAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.class, + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.Builder.class); + } + + private int polyCase_ = 0; + private java.lang.Object poly_; + + public enum PolyCase implements com.google.protobuf.Internal.EnumLite { + POLYLINE(2), + NORMALIZED_POLYLINE(3), + POLY_NOT_SET(0); + private final int value; + + private PolyCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static PolyCase valueOf(int value) { + return forNumber(value); + } + + public static PolyCase forNumber(int value) { + switch (value) { + case 2: + return POLYLINE; + case 3: + return NORMALIZED_POLYLINE; + case 0: + return POLY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PolyCase getPolyCase() { + return PolyCase.forNumber(polyCase_); + } + + public static final int POLYLINE_FIELD_NUMBER = 2; + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + public boolean hasPolyline() { + return polyCase_ == 2; + } + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + public com.google.cloud.datalabeling.v1beta1.Polyline getPolyline() { + if (polyCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.Polyline) poly_; + } + return com.google.cloud.datalabeling.v1beta1.Polyline.getDefaultInstance(); + } + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + public com.google.cloud.datalabeling.v1beta1.PolylineOrBuilder getPolylineOrBuilder() { + if (polyCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.Polyline) poly_; + } + return com.google.cloud.datalabeling.v1beta1.Polyline.getDefaultInstance(); + } + + public static final int NORMALIZED_POLYLINE_FIELD_NUMBER = 3; + /** .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; */ + public boolean hasNormalizedPolyline() { + return polyCase_ == 3; + } + /** .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; */ + public com.google.cloud.datalabeling.v1beta1.NormalizedPolyline getNormalizedPolyline() { + if (polyCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) poly_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.getDefaultInstance(); + } + /** .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; */ + public com.google.cloud.datalabeling.v1beta1.NormalizedPolylineOrBuilder + getNormalizedPolylineOrBuilder() { + if (polyCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) poly_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.getDefaultInstance(); + } + + public static final int ANNOTATION_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + /** + * + * + *
+   * Label of this polyline.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpec_ != null; + } + /** + * + * + *
+   * Label of this polyline.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + /** + * + * + *
+   * Label of this polyline.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + return getAnnotationSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (annotationSpec_ != null) { + output.writeMessage(1, getAnnotationSpec()); + } + if (polyCase_ == 2) { + output.writeMessage(2, (com.google.cloud.datalabeling.v1beta1.Polyline) poly_); + } + if (polyCase_ == 3) { + output.writeMessage(3, (com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) poly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (annotationSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnnotationSpec()); + } + if (polyCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.datalabeling.v1beta1.Polyline) poly_); + } + if (polyCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) poly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation other = + (com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) obj; + + if (hasAnnotationSpec() != other.hasAnnotationSpec()) return false; + if (hasAnnotationSpec()) { + if (!getAnnotationSpec().equals(other.getAnnotationSpec())) return false; + } + if (!getPolyCase().equals(other.getPolyCase())) return false; + switch (polyCase_) { + case 2: + if (!getPolyline().equals(other.getPolyline())) return false; + break; + case 3: + if (!getNormalizedPolyline().equals(other.getNormalizedPolyline())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnnotationSpec()) { + hash = (37 * hash) + ANNOTATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpec().hashCode(); + } + switch (polyCase_) { + case 2: + hash = (37 * hash) + POLYLINE_FIELD_NUMBER; + hash = (53 * hash) + getPolyline().hashCode(); + break; + case 3: + hash = (37 * hash) + NORMALIZED_POLYLINE_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedPolyline().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A polyline for the image annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImagePolylineAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImagePolylineAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.class, + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + polyCase_ = 0; + poly_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImagePolylineAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation build() { + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation buildPartial() { + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation result = + new com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation(this); + if (polyCase_ == 2) { + if (polylineBuilder_ == null) { + result.poly_ = poly_; + } else { + result.poly_ = polylineBuilder_.build(); + } + } + if (polyCase_ == 3) { + if (normalizedPolylineBuilder_ == null) { + result.poly_ = poly_; + } else { + result.poly_ = normalizedPolylineBuilder_.build(); + } + } + if (annotationSpecBuilder_ == null) { + result.annotationSpec_ = annotationSpec_; + } else { + result.annotationSpec_ = annotationSpecBuilder_.build(); + } + result.polyCase_ = polyCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.getDefaultInstance()) + return this; + if (other.hasAnnotationSpec()) { + mergeAnnotationSpec(other.getAnnotationSpec()); + } + switch (other.getPolyCase()) { + case POLYLINE: + { + mergePolyline(other.getPolyline()); + break; + } + case NORMALIZED_POLYLINE: + { + mergeNormalizedPolyline(other.getNormalizedPolyline()); + break; + } + case POLY_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int polyCase_ = 0; + private java.lang.Object poly_; + + public PolyCase getPolyCase() { + return PolyCase.forNumber(polyCase_); + } + + public Builder clearPoly() { + polyCase_ = 0; + poly_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Polyline, + com.google.cloud.datalabeling.v1beta1.Polyline.Builder, + com.google.cloud.datalabeling.v1beta1.PolylineOrBuilder> + polylineBuilder_; + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + public boolean hasPolyline() { + return polyCase_ == 2; + } + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + public com.google.cloud.datalabeling.v1beta1.Polyline getPolyline() { + if (polylineBuilder_ == null) { + if (polyCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.Polyline) poly_; + } + return com.google.cloud.datalabeling.v1beta1.Polyline.getDefaultInstance(); + } else { + if (polyCase_ == 2) { + return polylineBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.Polyline.getDefaultInstance(); + } + } + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + public Builder setPolyline(com.google.cloud.datalabeling.v1beta1.Polyline value) { + if (polylineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + poly_ = value; + onChanged(); + } else { + polylineBuilder_.setMessage(value); + } + polyCase_ = 2; + return this; + } + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + public Builder setPolyline( + com.google.cloud.datalabeling.v1beta1.Polyline.Builder builderForValue) { + if (polylineBuilder_ == null) { + poly_ = builderForValue.build(); + onChanged(); + } else { + polylineBuilder_.setMessage(builderForValue.build()); + } + polyCase_ = 2; + return this; + } + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + public Builder mergePolyline(com.google.cloud.datalabeling.v1beta1.Polyline value) { + if (polylineBuilder_ == null) { + if (polyCase_ == 2 + && poly_ != com.google.cloud.datalabeling.v1beta1.Polyline.getDefaultInstance()) { + poly_ = + com.google.cloud.datalabeling.v1beta1.Polyline.newBuilder( + (com.google.cloud.datalabeling.v1beta1.Polyline) poly_) + .mergeFrom(value) + .buildPartial(); + } else { + poly_ = value; + } + onChanged(); + } else { + if (polyCase_ == 2) { + polylineBuilder_.mergeFrom(value); + } + polylineBuilder_.setMessage(value); + } + polyCase_ = 2; + return this; + } + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + public Builder clearPolyline() { + if (polylineBuilder_ == null) { + if (polyCase_ == 2) { + polyCase_ = 0; + poly_ = null; + onChanged(); + } + } else { + if (polyCase_ == 2) { + polyCase_ = 0; + poly_ = null; + } + polylineBuilder_.clear(); + } + return this; + } + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + public com.google.cloud.datalabeling.v1beta1.Polyline.Builder getPolylineBuilder() { + return getPolylineFieldBuilder().getBuilder(); + } + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + public com.google.cloud.datalabeling.v1beta1.PolylineOrBuilder getPolylineOrBuilder() { + if ((polyCase_ == 2) && (polylineBuilder_ != null)) { + return polylineBuilder_.getMessageOrBuilder(); + } else { + if (polyCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.Polyline) poly_; + } + return com.google.cloud.datalabeling.v1beta1.Polyline.getDefaultInstance(); + } + } + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Polyline, + com.google.cloud.datalabeling.v1beta1.Polyline.Builder, + com.google.cloud.datalabeling.v1beta1.PolylineOrBuilder> + getPolylineFieldBuilder() { + if (polylineBuilder_ == null) { + if (!(polyCase_ == 2)) { + poly_ = com.google.cloud.datalabeling.v1beta1.Polyline.getDefaultInstance(); + } + polylineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Polyline, + com.google.cloud.datalabeling.v1beta1.Polyline.Builder, + com.google.cloud.datalabeling.v1beta1.PolylineOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.Polyline) poly_, + getParentForChildren(), + isClean()); + poly_ = null; + } + polyCase_ = 2; + onChanged(); + ; + return polylineBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline, + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedPolylineOrBuilder> + normalizedPolylineBuilder_; + /** + * .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; + */ + public boolean hasNormalizedPolyline() { + return polyCase_ == 3; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedPolyline getNormalizedPolyline() { + if (normalizedPolylineBuilder_ == null) { + if (polyCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) poly_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.getDefaultInstance(); + } else { + if (polyCase_ == 3) { + return normalizedPolylineBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.getDefaultInstance(); + } + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; + */ + public Builder setNormalizedPolyline( + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline value) { + if (normalizedPolylineBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + poly_ = value; + onChanged(); + } else { + normalizedPolylineBuilder_.setMessage(value); + } + polyCase_ = 3; + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; + */ + public Builder setNormalizedPolyline( + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.Builder builderForValue) { + if (normalizedPolylineBuilder_ == null) { + poly_ = builderForValue.build(); + onChanged(); + } else { + normalizedPolylineBuilder_.setMessage(builderForValue.build()); + } + polyCase_ = 3; + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; + */ + public Builder mergeNormalizedPolyline( + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline value) { + if (normalizedPolylineBuilder_ == null) { + if (polyCase_ == 3 + && poly_ + != com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.getDefaultInstance()) { + poly_ = + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.newBuilder( + (com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) poly_) + .mergeFrom(value) + .buildPartial(); + } else { + poly_ = value; + } + onChanged(); + } else { + if (polyCase_ == 3) { + normalizedPolylineBuilder_.mergeFrom(value); + } + normalizedPolylineBuilder_.setMessage(value); + } + polyCase_ = 3; + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; + */ + public Builder clearNormalizedPolyline() { + if (normalizedPolylineBuilder_ == null) { + if (polyCase_ == 3) { + polyCase_ = 0; + poly_ = null; + onChanged(); + } + } else { + if (polyCase_ == 3) { + polyCase_ = 0; + poly_ = null; + } + normalizedPolylineBuilder_.clear(); + } + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.Builder + getNormalizedPolylineBuilder() { + return getNormalizedPolylineFieldBuilder().getBuilder(); + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedPolylineOrBuilder + getNormalizedPolylineOrBuilder() { + if ((polyCase_ == 3) && (normalizedPolylineBuilder_ != null)) { + return normalizedPolylineBuilder_.getMessageOrBuilder(); + } else { + if (polyCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) poly_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.getDefaultInstance(); + } + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline, + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedPolylineOrBuilder> + getNormalizedPolylineFieldBuilder() { + if (normalizedPolylineBuilder_ == null) { + if (!(polyCase_ == 3)) { + poly_ = com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.getDefaultInstance(); + } + normalizedPolylineBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline, + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedPolylineOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) poly_, + getParentForChildren(), + isClean()); + poly_ = null; + } + polyCase_ = 3; + onChanged(); + ; + return normalizedPolylineBuilder_; + } + + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + annotationSpecBuilder_; + /** + * + * + *
+     * Label of this polyline.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpecBuilder_ != null || annotationSpec_ != null; + } + /** + * + * + *
+     * Label of this polyline.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } else { + return annotationSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Label of this polyline.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationSpec_ = value; + onChanged(); + } else { + annotationSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Label of this polyline.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder builderForValue) { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = builderForValue.build(); + onChanged(); + } else { + annotationSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Label of this polyline.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder mergeAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (annotationSpec_ != null) { + annotationSpec_ = + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.newBuilder(annotationSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationSpec_ = value; + } + onChanged(); + } else { + annotationSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Label of this polyline.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder clearAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + onChanged(); + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Label of this polyline.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder getAnnotationSpecBuilder() { + + onChanged(); + return getAnnotationSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Label of this polyline.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + if (annotationSpecBuilder_ != null) { + return annotationSpecBuilder_.getMessageOrBuilder(); + } else { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + } + /** + * + * + *
+     * Label of this polyline.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + getAnnotationSpecFieldBuilder() { + if (annotationSpecBuilder_ == null) { + annotationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>( + getAnnotationSpec(), getParentForChildren(), isClean()); + annotationSpec_ = null; + } + return annotationSpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) + private static final com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation(); + } + + public static com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImagePolylineAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImagePolylineAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePolylineAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePolylineAnnotationOrBuilder.java new file mode 100644 index 000000000000..7f445a263d7c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImagePolylineAnnotationOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ImagePolylineAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + boolean hasPolyline(); + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + com.google.cloud.datalabeling.v1beta1.Polyline getPolyline(); + /** .google.cloud.datalabeling.v1beta1.Polyline polyline = 2; */ + com.google.cloud.datalabeling.v1beta1.PolylineOrBuilder getPolylineOrBuilder(); + + /** .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; */ + boolean hasNormalizedPolyline(); + /** .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; */ + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline getNormalizedPolyline(); + /** .google.cloud.datalabeling.v1beta1.NormalizedPolyline normalized_polyline = 3; */ + com.google.cloud.datalabeling.v1beta1.NormalizedPolylineOrBuilder + getNormalizedPolylineOrBuilder(); + + /** + * + * + *
+   * Label of this polyline.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + boolean hasAnnotationSpec(); + /** + * + * + *
+   * Label of this polyline.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec(); + /** + * + * + *
+   * Label of this polyline.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder getAnnotationSpecOrBuilder(); + + public com.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.PolyCase getPolyCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageSegmentationAnnotation.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageSegmentationAnnotation.java new file mode 100644 index 000000000000..3141ab0ff673 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageSegmentationAnnotation.java @@ -0,0 +1,1091 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Image segmentation annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} + */ +public final class ImageSegmentationAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) + ImageSegmentationAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImageSegmentationAnnotation.newBuilder() to construct. + private ImageSegmentationAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImageSegmentationAnnotation() { + mimeType_ = ""; + imageBytes_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImageSegmentationAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotationColors_ = + com.google.protobuf.MapField.newMapField( + AnnotationColorsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.datalabeling.v1beta1.AnnotationSpec> + annotationColors__ = + input.readMessage( + AnnotationColorsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + annotationColors_ + .getMutableMap() + .put(annotationColors__.getKey(), annotationColors__.getValue()); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 26: + { + imageBytes_ = input.readBytes(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetAnnotationColors(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.class, + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.Builder.class); + } + + private int bitField0_; + public static final int ANNOTATION_COLORS_FIELD_NUMBER = 1; + + private static final class AnnotationColorsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.datalabeling.v1beta1.AnnotationSpec> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_AnnotationColorsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.datalabeling.v1beta1.AnnotationSpec> + annotationColors_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.datalabeling.v1beta1.AnnotationSpec> + internalGetAnnotationColors() { + if (annotationColors_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationColorsDefaultEntryHolder.defaultEntry); + } + return annotationColors_; + } + + public int getAnnotationColorsCount() { + return internalGetAnnotationColors().getMap().size(); + } + /** + * + * + *
+   * The mapping between rgb color and annotation spec. The key is the rgb
+   * color represented in format of rgb(0, 0, 0). The value is the
+   * AnnotationSpec.
+   * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + public boolean containsAnnotationColors(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotationColors().getMap().containsKey(key); + } + /** Use {@link #getAnnotationColorsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map + getAnnotationColors() { + return getAnnotationColorsMap(); + } + /** + * + * + *
+   * The mapping between rgb color and annotation spec. The key is the rgb
+   * color represented in format of rgb(0, 0, 0). The value is the
+   * AnnotationSpec.
+   * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + public java.util.Map + getAnnotationColorsMap() { + return internalGetAnnotationColors().getMap(); + } + /** + * + * + *
+   * The mapping between rgb color and annotation spec. The key is the rgb
+   * color represented in format of rgb(0, 0, 0). The value is the
+   * AnnotationSpec.
+   * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationColorsOrDefault( + java.lang.String key, com.google.cloud.datalabeling.v1beta1.AnnotationSpec defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAnnotationColors().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * The mapping between rgb color and annotation spec. The key is the rgb
+   * color represented in format of rgb(0, 0, 0). The value is the
+   * AnnotationSpec.
+   * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationColorsOrThrow( + java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAnnotationColors().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int MIME_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object mimeType_; + /** + * + * + *
+   * Image format.
+   * 
+ * + * string mime_type = 2; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + * + * + *
+   * Image format.
+   * 
+ * + * string mime_type = 2; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_BYTES_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString imageBytes_; + /** + * + * + *
+   * A byte string of a full image's color map.
+   * 
+ * + * bytes image_bytes = 3; + */ + public com.google.protobuf.ByteString getImageBytes() { + return imageBytes_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetAnnotationColors(), AnnotationColorsDefaultEntryHolder.defaultEntry, 1); + if (!getMimeTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); + } + if (!imageBytes_.isEmpty()) { + output.writeBytes(3, imageBytes_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry + entry : internalGetAnnotationColors().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.datalabeling.v1beta1.AnnotationSpec> + annotationColors__ = + AnnotationColorsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, annotationColors__); + } + if (!getMimeTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); + } + if (!imageBytes_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, imageBytes_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation other = + (com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) obj; + + if (!internalGetAnnotationColors().equals(other.internalGetAnnotationColors())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getImageBytes().equals(other.getImageBytes())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetAnnotationColors().getMap().isEmpty()) { + hash = (37 * hash) + ANNOTATION_COLORS_FIELD_NUMBER; + hash = (53 * hash) + internalGetAnnotationColors().hashCode(); + } + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + IMAGE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getImageBytes().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Image segmentation annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetAnnotationColors(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 1: + return internalGetMutableAnnotationColors(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.class, + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableAnnotationColors().clear(); + mimeType_ = ""; + + imageBytes_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImageSegmentationAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation build() { + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation buildPartial() { + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation result = + new com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.annotationColors_ = internalGetAnnotationColors(); + result.annotationColors_.makeImmutable(); + result.mimeType_ = mimeType_; + result.imageBytes_ = imageBytes_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.getDefaultInstance()) + return this; + internalGetMutableAnnotationColors().mergeFrom(other.internalGetAnnotationColors()); + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + if (other.getImageBytes() != com.google.protobuf.ByteString.EMPTY) { + setImageBytes(other.getImageBytes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.datalabeling.v1beta1.AnnotationSpec> + annotationColors_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.datalabeling.v1beta1.AnnotationSpec> + internalGetAnnotationColors() { + if (annotationColors_ == null) { + return com.google.protobuf.MapField.emptyMapField( + AnnotationColorsDefaultEntryHolder.defaultEntry); + } + return annotationColors_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.datalabeling.v1beta1.AnnotationSpec> + internalGetMutableAnnotationColors() { + onChanged(); + ; + if (annotationColors_ == null) { + annotationColors_ = + com.google.protobuf.MapField.newMapField( + AnnotationColorsDefaultEntryHolder.defaultEntry); + } + if (!annotationColors_.isMutable()) { + annotationColors_ = annotationColors_.copy(); + } + return annotationColors_; + } + + public int getAnnotationColorsCount() { + return internalGetAnnotationColors().getMap().size(); + } + /** + * + * + *
+     * The mapping between rgb color and annotation spec. The key is the rgb
+     * color represented in format of rgb(0, 0, 0). The value is the
+     * AnnotationSpec.
+     * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + public boolean containsAnnotationColors(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetAnnotationColors().getMap().containsKey(key); + } + /** Use {@link #getAnnotationColorsMap()} instead. */ + @java.lang.Deprecated + public java.util.Map + getAnnotationColors() { + return getAnnotationColorsMap(); + } + /** + * + * + *
+     * The mapping between rgb color and annotation spec. The key is the rgb
+     * color represented in format of rgb(0, 0, 0). The value is the
+     * AnnotationSpec.
+     * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + public java.util.Map + getAnnotationColorsMap() { + return internalGetAnnotationColors().getMap(); + } + /** + * + * + *
+     * The mapping between rgb color and annotation spec. The key is the rgb
+     * color represented in format of rgb(0, 0, 0). The value is the
+     * AnnotationSpec.
+     * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationColorsOrDefault( + java.lang.String key, com.google.cloud.datalabeling.v1beta1.AnnotationSpec defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAnnotationColors().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * The mapping between rgb color and annotation spec. The key is the rgb
+     * color represented in format of rgb(0, 0, 0). The value is the
+     * AnnotationSpec.
+     * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationColorsOrThrow( + java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = + internalGetAnnotationColors().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearAnnotationColors() { + internalGetMutableAnnotationColors().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The mapping between rgb color and annotation spec. The key is the rgb
+     * color represented in format of rgb(0, 0, 0). The value is the
+     * AnnotationSpec.
+     * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + public Builder removeAnnotationColors(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotationColors().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableAnnotationColors() { + return internalGetMutableAnnotationColors().getMutableMap(); + } + /** + * + * + *
+     * The mapping between rgb color and annotation spec. The key is the rgb
+     * color represented in format of rgb(0, 0, 0). The value is the
+     * AnnotationSpec.
+     * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + public Builder putAnnotationColors( + java.lang.String key, com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableAnnotationColors().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * The mapping between rgb color and annotation spec. The key is the rgb
+     * color represented in format of rgb(0, 0, 0). The value is the
+     * AnnotationSpec.
+     * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + public Builder putAllAnnotationColors( + java.util.Map + values) { + internalGetMutableAnnotationColors().getMutableMap().putAll(values); + return this; + } + + private java.lang.Object mimeType_ = ""; + /** + * + * + *
+     * Image format.
+     * 
+ * + * string mime_type = 2; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Image format.
+     * 
+ * + * string mime_type = 2; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Image format.
+     * 
+ * + * string mime_type = 2; + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Image format.
+     * 
+ * + * string mime_type = 2; + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Image format.
+     * 
+ * + * string mime_type = 2; + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString imageBytes_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * A byte string of a full image's color map.
+     * 
+ * + * bytes image_bytes = 3; + */ + public com.google.protobuf.ByteString getImageBytes() { + return imageBytes_; + } + /** + * + * + *
+     * A byte string of a full image's color map.
+     * 
+ * + * bytes image_bytes = 3; + */ + public Builder setImageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + imageBytes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A byte string of a full image's color map.
+     * 
+ * + * bytes image_bytes = 3; + */ + public Builder clearImageBytes() { + + imageBytes_ = getDefaultInstance().getImageBytes(); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) + private static final com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation(); + } + + public static com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImageSegmentationAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImageSegmentationAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageSegmentationAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageSegmentationAnnotationOrBuilder.java new file mode 100644 index 000000000000..fc3901bb1b01 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImageSegmentationAnnotationOrBuilder.java @@ -0,0 +1,120 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ImageSegmentationAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The mapping between rgb color and annotation spec. The key is the rgb
+   * color represented in format of rgb(0, 0, 0). The value is the
+   * AnnotationSpec.
+   * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + int getAnnotationColorsCount(); + /** + * + * + *
+   * The mapping between rgb color and annotation spec. The key is the rgb
+   * color represented in format of rgb(0, 0, 0). The value is the
+   * AnnotationSpec.
+   * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + boolean containsAnnotationColors(java.lang.String key); + /** Use {@link #getAnnotationColorsMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getAnnotationColors(); + /** + * + * + *
+   * The mapping between rgb color and annotation spec. The key is the rgb
+   * color represented in format of rgb(0, 0, 0). The value is the
+   * AnnotationSpec.
+   * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + java.util.Map + getAnnotationColorsMap(); + /** + * + * + *
+   * The mapping between rgb color and annotation spec. The key is the rgb
+   * color represented in format of rgb(0, 0, 0). The value is the
+   * AnnotationSpec.
+   * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationColorsOrDefault( + java.lang.String key, com.google.cloud.datalabeling.v1beta1.AnnotationSpec defaultValue); + /** + * + * + *
+   * The mapping between rgb color and annotation spec. The key is the rgb
+   * color represented in format of rgb(0, 0, 0). The value is the
+   * AnnotationSpec.
+   * 
+ * + * + * map<string, .google.cloud.datalabeling.v1beta1.AnnotationSpec> annotation_colors = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationColorsOrThrow( + java.lang.String key); + + /** + * + * + *
+   * Image format.
+   * 
+ * + * string mime_type = 2; + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * Image format.
+   * 
+ * + * string mime_type = 2; + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * A byte string of a full image's color map.
+   * 
+ * + * bytes image_bytes = 3; + */ + com.google.protobuf.ByteString getImageBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationMetadata.java new file mode 100644 index 000000000000..2ea513ca6673 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationMetadata.java @@ -0,0 +1,1145 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Metadata of an ImportData operation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata} + */ +public final class ImportDataOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata) + ImportDataOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDataOperationMetadata.newBuilder() to construct. + private ImportDataOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDataOperationMetadata() { + dataset_ = ""; + partialFailures_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportDataOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + dataset_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + partialFailures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + partialFailures_.add( + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata.Builder.class); + } + + private int bitField0_; + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+   * Ouptut only. The name of imported dataset.
+   * "projects/*/datasets/*"
+   * 
+ * + * string dataset = 1; + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+   * Ouptut only. The name of imported dataset.
+   * "projects/*/datasets/*"
+   * 
+ * + * string dataset = 1; + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTIAL_FAILURES_FIELD_NUMBER = 2; + private java.util.List partialFailures_; + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List + getPartialFailuresOrBuilderList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public int getPartialFailuresCount() { + return partialFailures_.size(); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status getPartialFailures(int index) { + return partialFailures_.get(index); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + return partialFailures_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + for (int i = 0; i < partialFailures_.size(); i++) { + output.writeMessage(2, partialFailures_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + for (int i = 0; i < partialFailures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, partialFailures_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (!getPartialFailuresList().equals(other.getPartialFailuresList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + if (getPartialFailuresCount() > 0) { + hash = (37 * hash) + PARTIAL_FAILURES_FIELD_NUMBER; + hash = (53 * hash) + getPartialFailuresList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata of an ImportData operation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata) + com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPartialFailuresFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dataset_ = ""; + + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + partialFailuresBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata buildPartial() { + com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.dataset_ = dataset_; + if (partialFailuresBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.partialFailures_ = partialFailures_; + } else { + result.partialFailures_ = partialFailuresBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata.getDefaultInstance()) + return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (partialFailuresBuilder_ == null) { + if (!other.partialFailures_.isEmpty()) { + if (partialFailures_.isEmpty()) { + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePartialFailuresIsMutable(); + partialFailures_.addAll(other.partialFailures_); + } + onChanged(); + } + } else { + if (!other.partialFailures_.isEmpty()) { + if (partialFailuresBuilder_.isEmpty()) { + partialFailuresBuilder_.dispose(); + partialFailuresBuilder_ = null; + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000002); + partialFailuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPartialFailuresFieldBuilder() + : null; + } else { + partialFailuresBuilder_.addAllMessages(other.partialFailures_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+     * Ouptut only. The name of imported dataset.
+     * "projects/*/datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Ouptut only. The name of imported dataset.
+     * "projects/*/datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Ouptut only. The name of imported dataset.
+     * "projects/*/datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Ouptut only. The name of imported dataset.
+     * "projects/*/datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + * + * + *
+     * Ouptut only. The name of imported dataset.
+     * "projects/*/datasets/*"
+     * 
+ * + * string dataset = 1; + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.util.List partialFailures_ = + java.util.Collections.emptyList(); + + private void ensurePartialFailuresIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + partialFailures_ = new java.util.ArrayList(partialFailures_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + partialFailuresBuilder_; + + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresList() { + if (partialFailuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialFailures_); + } else { + return partialFailuresBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public int getPartialFailuresCount() { + if (partialFailuresBuilder_ == null) { + return partialFailures_.size(); + } else { + return partialFailuresBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status getPartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder setPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, value); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder setPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addAllPartialFailures( + java.lang.Iterable values) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialFailures_); + onChanged(); + } else { + partialFailuresBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder clearPartialFailures() { + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + partialFailuresBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder removePartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.remove(index); + onChanged(); + } else { + partialFailuresBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder getPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List + getPartialFailuresOrBuilderList() { + if (partialFailuresBuilder_ != null) { + return partialFailuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialFailures_); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder() { + return getPartialFailuresFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresBuilderList() { + return getPartialFailuresFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getPartialFailuresFieldBuilder() { + if (partialFailuresBuilder_ == null) { + partialFailuresBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + partialFailures_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + partialFailures_ = null; + } + return partialFailuresBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDataOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportDataOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..ca76758c1d53 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationMetadataOrBuilder.java @@ -0,0 +1,94 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ImportDataOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Ouptut only. The name of imported dataset.
+   * "projects/*/datasets/*"
+   * 
+ * + * string dataset = 1; + */ + java.lang.String getDataset(); + /** + * + * + *
+   * Ouptut only. The name of imported dataset.
+   * "projects/*/datasets/*"
+   * 
+ * + * string dataset = 1; + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + java.util.List getPartialFailuresList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + com.google.rpc.Status getPartialFailures(int index); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + int getPartialFailuresCount(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + java.util.List getPartialFailuresOrBuilderList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationResponse.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationResponse.java new file mode 100644 index 000000000000..118aef0a3033 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationResponse.java @@ -0,0 +1,766 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Response used for ImportData longrunning operation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImportDataOperationResponse} + */ +public final class ImportDataOperationResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ImportDataOperationResponse) + ImportDataOperationResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDataOperationResponse.newBuilder() to construct. + private ImportDataOperationResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDataOperationResponse() { + dataset_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportDataOperationResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + dataset_ = s; + break; + } + case 16: + { + totalCount_ = input.readInt32(); + break; + } + case 24: + { + importCount_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse.class, + com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse.Builder.class); + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+   * Ouptut only. The name of imported dataset.
+   * 
+ * + * string dataset = 1; + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+   * Ouptut only. The name of imported dataset.
+   * 
+ * + * string dataset = 1; + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_COUNT_FIELD_NUMBER = 2; + private int totalCount_; + /** + * + * + *
+   * Output only. Total number of examples requested to import
+   * 
+ * + * int32 total_count = 2; + */ + public int getTotalCount() { + return totalCount_; + } + + public static final int IMPORT_COUNT_FIELD_NUMBER = 3; + private int importCount_; + /** + * + * + *
+   * Output only. Number of examples imported successfully.
+   * 
+ * + * int32 import_count = 3; + */ + public int getImportCount() { + return importCount_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (totalCount_ != 0) { + output.writeInt32(2, totalCount_); + } + if (importCount_ != 0) { + output.writeInt32(3, importCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (totalCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, totalCount_); + } + if (importCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, importCount_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse other = + (com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (getTotalCount() != other.getTotalCount()) return false; + if (getImportCount() != other.getImportCount()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + TOTAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getTotalCount(); + hash = (37 * hash) + IMPORT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getImportCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response used for ImportData longrunning operation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImportDataOperationResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ImportDataOperationResponse) + com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse.class, + com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dataset_ = ""; + + totalCount_ = 0; + + importCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse build() { + com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse buildPartial() { + com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse result = + new com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse(this); + result.dataset_ = dataset_; + result.totalCount_ = totalCount_; + result.importCount_ = importCount_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse.getDefaultInstance()) + return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (other.getTotalCount() != 0) { + setTotalCount(other.getTotalCount()); + } + if (other.getImportCount() != 0) { + setImportCount(other.getImportCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+     * Ouptut only. The name of imported dataset.
+     * 
+ * + * string dataset = 1; + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Ouptut only. The name of imported dataset.
+     * 
+ * + * string dataset = 1; + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Ouptut only. The name of imported dataset.
+     * 
+ * + * string dataset = 1; + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Ouptut only. The name of imported dataset.
+     * 
+ * + * string dataset = 1; + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + * + * + *
+     * Ouptut only. The name of imported dataset.
+     * 
+ * + * string dataset = 1; + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private int totalCount_; + /** + * + * + *
+     * Output only. Total number of examples requested to import
+     * 
+ * + * int32 total_count = 2; + */ + public int getTotalCount() { + return totalCount_; + } + /** + * + * + *
+     * Output only. Total number of examples requested to import
+     * 
+ * + * int32 total_count = 2; + */ + public Builder setTotalCount(int value) { + + totalCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Total number of examples requested to import
+     * 
+ * + * int32 total_count = 2; + */ + public Builder clearTotalCount() { + + totalCount_ = 0; + onChanged(); + return this; + } + + private int importCount_; + /** + * + * + *
+     * Output only. Number of examples imported successfully.
+     * 
+ * + * int32 import_count = 3; + */ + public int getImportCount() { + return importCount_; + } + /** + * + * + *
+     * Output only. Number of examples imported successfully.
+     * 
+ * + * int32 import_count = 3; + */ + public Builder setImportCount(int value) { + + importCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Number of examples imported successfully.
+     * 
+ * + * int32 import_count = 3; + */ + public Builder clearImportCount() { + + importCount_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ImportDataOperationResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ImportDataOperationResponse) + private static final com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse(); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDataOperationResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportDataOperationResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationResponseOrBuilder.java new file mode 100644 index 000000000000..e96b699e7482 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataOperationResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ImportDataOperationResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ImportDataOperationResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Ouptut only. The name of imported dataset.
+   * 
+ * + * string dataset = 1; + */ + java.lang.String getDataset(); + /** + * + * + *
+   * Ouptut only. The name of imported dataset.
+   * 
+ * + * string dataset = 1; + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+   * Output only. Total number of examples requested to import
+   * 
+ * + * int32 total_count = 2; + */ + int getTotalCount(); + + /** + * + * + *
+   * Output only. Number of examples imported successfully.
+   * 
+ * + * int32 import_count = 3; + */ + int getImportCount(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataRequest.java new file mode 100644 index 000000000000..5bd04302d162 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataRequest.java @@ -0,0 +1,874 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for ImportData API.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImportDataRequest} + */ +public final class ImportDataRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ImportDataRequest) + ImportDataRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ImportDataRequest.newBuilder() to construct. + private ImportDataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ImportDataRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ImportDataRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.InputConfig.Builder subBuilder = null; + if (inputConfig_ != null) { + subBuilder = inputConfig_.toBuilder(); + } + inputConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.InputConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(inputConfig_); + inputConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImportDataRequest.class, + com.google.cloud.datalabeling.v1beta1.ImportDataRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.InputConfig inputConfig_; + /** + * + * + *
+   * Required. Specify the input source of the data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + public boolean hasInputConfig() { + return inputConfig_ != null; + } + /** + * + * + *
+   * Required. Specify the input source of the data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfig getInputConfig() { + return inputConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.InputConfig.getDefaultInstance() + : inputConfig_; + } + /** + * + * + *
+   * Required. Specify the input source of the data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + return getInputConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (inputConfig_ != null) { + output.writeMessage(2, getInputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (inputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getInputConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ImportDataRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ImportDataRequest other = + (com.google.cloud.datalabeling.v1beta1.ImportDataRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasInputConfig() != other.hasInputConfig()) return false; + if (hasInputConfig()) { + if (!getInputConfig().equals(other.getInputConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasInputConfig()) { + hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getInputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ImportDataRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ImportData API.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ImportDataRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ImportDataRequest) + com.google.cloud.datalabeling.v1beta1.ImportDataRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ImportDataRequest.class, + com.google.cloud.datalabeling.v1beta1.ImportDataRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ImportDataRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ImportDataRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ImportDataRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataRequest build() { + com.google.cloud.datalabeling.v1beta1.ImportDataRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.ImportDataRequest result = + new com.google.cloud.datalabeling.v1beta1.ImportDataRequest(this); + result.name_ = name_; + if (inputConfigBuilder_ == null) { + result.inputConfig_ = inputConfig_; + } else { + result.inputConfig_ = inputConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ImportDataRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ImportDataRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ImportDataRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.ImportDataRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasInputConfig()) { + mergeInputConfig(other.getInputConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ImportDataRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ImportDataRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource name, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.InputConfig inputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.InputConfig, + com.google.cloud.datalabeling.v1beta1.InputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder> + inputConfigBuilder_; + /** + * + * + *
+     * Required. Specify the input source of the data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + public boolean hasInputConfig() { + return inputConfigBuilder_ != null || inputConfig_ != null; + } + /** + * + * + *
+     * Required. Specify the input source of the data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfig getInputConfig() { + if (inputConfigBuilder_ == null) { + return inputConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.InputConfig.getDefaultInstance() + : inputConfig_; + } else { + return inputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Specify the input source of the data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + public Builder setInputConfig(com.google.cloud.datalabeling.v1beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inputConfig_ = value; + onChanged(); + } else { + inputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Specify the input source of the data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + public Builder setInputConfig( + com.google.cloud.datalabeling.v1beta1.InputConfig.Builder builderForValue) { + if (inputConfigBuilder_ == null) { + inputConfig_ = builderForValue.build(); + onChanged(); + } else { + inputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Specify the input source of the data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + public Builder mergeInputConfig(com.google.cloud.datalabeling.v1beta1.InputConfig value) { + if (inputConfigBuilder_ == null) { + if (inputConfig_ != null) { + inputConfig_ = + com.google.cloud.datalabeling.v1beta1.InputConfig.newBuilder(inputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + inputConfig_ = value; + } + onChanged(); + } else { + inputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Specify the input source of the data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + public Builder clearInputConfig() { + if (inputConfigBuilder_ == null) { + inputConfig_ = null; + onChanged(); + } else { + inputConfig_ = null; + inputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Specify the input source of the data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfig.Builder getInputConfigBuilder() { + + onChanged(); + return getInputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Specify the input source of the data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder getInputConfigOrBuilder() { + if (inputConfigBuilder_ != null) { + return inputConfigBuilder_.getMessageOrBuilder(); + } else { + return inputConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.InputConfig.getDefaultInstance() + : inputConfig_; + } + } + /** + * + * + *
+     * Required. Specify the input source of the data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.InputConfig, + com.google.cloud.datalabeling.v1beta1.InputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder> + getInputConfigFieldBuilder() { + if (inputConfigBuilder_ == null) { + inputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.InputConfig, + com.google.cloud.datalabeling.v1beta1.InputConfig.Builder, + com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder>( + getInputConfig(), getParentForChildren(), isClean()); + inputConfig_ = null; + } + return inputConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ImportDataRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ImportDataRequest) + private static final com.google.cloud.datalabeling.v1beta1.ImportDataRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ImportDataRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.ImportDataRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImportDataRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ImportDataRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ImportDataRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataRequestOrBuilder.java new file mode 100644 index 000000000000..cf696f87abf6 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ImportDataRequestOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ImportDataRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ImportDataRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. Dataset resource name, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Specify the input source of the data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + boolean hasInputConfig(); + /** + * + * + *
+   * Required. Specify the input source of the data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + com.google.cloud.datalabeling.v1beta1.InputConfig getInputConfig(); + /** + * + * + *
+   * Required. Specify the input source of the data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.InputConfig input_config = 2; + */ + com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder getInputConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InputConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InputConfig.java new file mode 100644 index 000000000000..c9d4326f94a3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InputConfig.java @@ -0,0 +1,831 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * The configuration of input data, including data type, location, etc.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.InputConfig} + */ +public final class InputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.InputConfig) + InputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputConfig.newBuilder() to construct. + private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private InputConfig() { + dataType_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private InputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + dataType_ = rawValue; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.GcsSource.Builder subBuilder = null; + if (sourceCase_ == 2) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.GcsSource) source_).toBuilder(); + } + source_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.GcsSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.datalabeling.v1beta1.GcsSource) source_); + source_ = subBuilder.buildPartial(); + } + sourceCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.InputConfig.class, + com.google.cloud.datalabeling.v1beta1.InputConfig.Builder.class); + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public enum SourceCase implements com.google.protobuf.Internal.EnumLite { + GCS_SOURCE(2), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 2: + return GCS_SOURCE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int GCS_SOURCE_FIELD_NUMBER = 2; + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + public boolean hasGcsSource() { + return sourceCase_ == 2; + } + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + public com.google.cloud.datalabeling.v1beta1.GcsSource getGcsSource() { + if (sourceCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.GcsSource) source_; + } + return com.google.cloud.datalabeling.v1beta1.GcsSource.getDefaultInstance(); + } + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + public com.google.cloud.datalabeling.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if (sourceCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.GcsSource) source_; + } + return com.google.cloud.datalabeling.v1beta1.GcsSource.getDefaultInstance(); + } + + public static final int DATA_TYPE_FIELD_NUMBER = 1; + private int dataType_; + /** + * + * + *
+   * Required. Data type must be specifed when user tries to import data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 1; + */ + public int getDataTypeValue() { + return dataType_; + } + /** + * + * + *
+   * Required. Data type must be specifed when user tries to import data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 1; + */ + public com.google.cloud.datalabeling.v1beta1.DataType getDataType() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.DataType result = + com.google.cloud.datalabeling.v1beta1.DataType.valueOf(dataType_); + return result == null ? com.google.cloud.datalabeling.v1beta1.DataType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (dataType_ + != com.google.cloud.datalabeling.v1beta1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, dataType_); + } + if (sourceCase_ == 2) { + output.writeMessage(2, (com.google.cloud.datalabeling.v1beta1.GcsSource) source_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataType_ + != com.google.cloud.datalabeling.v1beta1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, dataType_); + } + if (sourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.datalabeling.v1beta1.GcsSource) source_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.InputConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.InputConfig other = + (com.google.cloud.datalabeling.v1beta1.InputConfig) obj; + + if (dataType_ != other.dataType_) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 2: + if (!getGcsSource().equals(other.getGcsSource())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATA_TYPE_FIELD_NUMBER; + hash = (53 * hash) + dataType_; + switch (sourceCase_) { + case 2: + hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.InputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration of input data, including data type, location, etc.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.InputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.InputConfig) + com.google.cloud.datalabeling.v1beta1.InputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_InputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_InputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.InputConfig.class, + com.google.cloud.datalabeling.v1beta1.InputConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.InputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + dataType_ = 0; + + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_InputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.InputConfig getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.InputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.InputConfig build() { + com.google.cloud.datalabeling.v1beta1.InputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.InputConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.InputConfig result = + new com.google.cloud.datalabeling.v1beta1.InputConfig(this); + if (sourceCase_ == 2) { + if (gcsSourceBuilder_ == null) { + result.source_ = source_; + } else { + result.source_ = gcsSourceBuilder_.build(); + } + } + result.dataType_ = dataType_; + result.sourceCase_ = sourceCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.InputConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.InputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.InputConfig other) { + if (other == com.google.cloud.datalabeling.v1beta1.InputConfig.getDefaultInstance()) + return this; + if (other.dataType_ != 0) { + setDataTypeValue(other.getDataTypeValue()); + } + switch (other.getSourceCase()) { + case GCS_SOURCE: + { + mergeGcsSource(other.getGcsSource()); + break; + } + case SOURCE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.InputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.InputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.GcsSource, + com.google.cloud.datalabeling.v1beta1.GcsSource.Builder, + com.google.cloud.datalabeling.v1beta1.GcsSourceOrBuilder> + gcsSourceBuilder_; + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + public boolean hasGcsSource() { + return sourceCase_ == 2; + } + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + public com.google.cloud.datalabeling.v1beta1.GcsSource getGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.GcsSource) source_; + } + return com.google.cloud.datalabeling.v1beta1.GcsSource.getDefaultInstance(); + } else { + if (sourceCase_ == 2) { + return gcsSourceBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.GcsSource.getDefaultInstance(); + } + } + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + public Builder setGcsSource(com.google.cloud.datalabeling.v1beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + source_ = value; + onChanged(); + } else { + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + public Builder setGcsSource( + com.google.cloud.datalabeling.v1beta1.GcsSource.Builder builderForValue) { + if (gcsSourceBuilder_ == null) { + source_ = builderForValue.build(); + onChanged(); + } else { + gcsSourceBuilder_.setMessage(builderForValue.build()); + } + sourceCase_ = 2; + return this; + } + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + public Builder mergeGcsSource(com.google.cloud.datalabeling.v1beta1.GcsSource value) { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 2 + && source_ != com.google.cloud.datalabeling.v1beta1.GcsSource.getDefaultInstance()) { + source_ = + com.google.cloud.datalabeling.v1beta1.GcsSource.newBuilder( + (com.google.cloud.datalabeling.v1beta1.GcsSource) source_) + .mergeFrom(value) + .buildPartial(); + } else { + source_ = value; + } + onChanged(); + } else { + if (sourceCase_ == 2) { + gcsSourceBuilder_.mergeFrom(value); + } + gcsSourceBuilder_.setMessage(value); + } + sourceCase_ = 2; + return this; + } + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + public Builder clearGcsSource() { + if (gcsSourceBuilder_ == null) { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + } else { + if (sourceCase_ == 2) { + sourceCase_ = 0; + source_ = null; + } + gcsSourceBuilder_.clear(); + } + return this; + } + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + public com.google.cloud.datalabeling.v1beta1.GcsSource.Builder getGcsSourceBuilder() { + return getGcsSourceFieldBuilder().getBuilder(); + } + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + public com.google.cloud.datalabeling.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { + if ((sourceCase_ == 2) && (gcsSourceBuilder_ != null)) { + return gcsSourceBuilder_.getMessageOrBuilder(); + } else { + if (sourceCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.GcsSource) source_; + } + return com.google.cloud.datalabeling.v1beta1.GcsSource.getDefaultInstance(); + } + } + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.GcsSource, + com.google.cloud.datalabeling.v1beta1.GcsSource.Builder, + com.google.cloud.datalabeling.v1beta1.GcsSourceOrBuilder> + getGcsSourceFieldBuilder() { + if (gcsSourceBuilder_ == null) { + if (!(sourceCase_ == 2)) { + source_ = com.google.cloud.datalabeling.v1beta1.GcsSource.getDefaultInstance(); + } + gcsSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.GcsSource, + com.google.cloud.datalabeling.v1beta1.GcsSource.Builder, + com.google.cloud.datalabeling.v1beta1.GcsSourceOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.GcsSource) source_, + getParentForChildren(), + isClean()); + source_ = null; + } + sourceCase_ = 2; + onChanged(); + ; + return gcsSourceBuilder_; + } + + private int dataType_ = 0; + /** + * + * + *
+     * Required. Data type must be specifed when user tries to import data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 1; + */ + public int getDataTypeValue() { + return dataType_; + } + /** + * + * + *
+     * Required. Data type must be specifed when user tries to import data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 1; + */ + public Builder setDataTypeValue(int value) { + dataType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Data type must be specifed when user tries to import data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 1; + */ + public com.google.cloud.datalabeling.v1beta1.DataType getDataType() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.DataType result = + com.google.cloud.datalabeling.v1beta1.DataType.valueOf(dataType_); + return result == null ? com.google.cloud.datalabeling.v1beta1.DataType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. Data type must be specifed when user tries to import data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 1; + */ + public Builder setDataType(com.google.cloud.datalabeling.v1beta1.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dataType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Data type must be specifed when user tries to import data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 1; + */ + public Builder clearDataType() { + + dataType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.InputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.InputConfig) + private static final com.google.cloud.datalabeling.v1beta1.InputConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.InputConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.InputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.InputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InputConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InputConfigOrBuilder.java new file mode 100644 index 000000000000..05d2590ba1f4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InputConfigOrBuilder.java @@ -0,0 +1,40 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface InputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.InputConfig) + com.google.protobuf.MessageOrBuilder { + + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + boolean hasGcsSource(); + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + com.google.cloud.datalabeling.v1beta1.GcsSource getGcsSource(); + /** .google.cloud.datalabeling.v1beta1.GcsSource gcs_source = 2; */ + com.google.cloud.datalabeling.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); + + /** + * + * + *
+   * Required. Data type must be specifed when user tries to import data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 1; + */ + int getDataTypeValue(); + /** + * + * + *
+   * Required. Data type must be specifed when user tries to import data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 1; + */ + com.google.cloud.datalabeling.v1beta1.DataType getDataType(); + + public com.google.cloud.datalabeling.v1beta1.InputConfig.SourceCase getSourceCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Instruction.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Instruction.java new file mode 100644 index 000000000000..a945fddf2add --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Instruction.java @@ -0,0 +1,2197 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/instruction.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Instruction of how to perform the labeling task for human operators.
+ * Currently two types of instruction are supported - CSV file and PDF.
+ * One of the two types instruction must be provided.
+ * CSV file is only supported for image classification task. Instructions for
+ * other task should be provided as PDF.
+ * For image classification, CSV and PDF can be provided at the same time.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Instruction} + */ +public final class Instruction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.Instruction) + InstructionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Instruction.newBuilder() to construct. + private Instruction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Instruction() { + name_ = ""; + displayName_ = ""; + description_ = ""; + dataType_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Instruction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + int rawValue = input.readEnum(); + + dataType_ = rawValue; + break; + } + case 58: + { + com.google.cloud.datalabeling.v1beta1.CsvInstruction.Builder subBuilder = null; + if (csvInstruction_ != null) { + subBuilder = csvInstruction_.toBuilder(); + } + csvInstruction_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.CsvInstruction.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(csvInstruction_); + csvInstruction_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.cloud.datalabeling.v1beta1.PdfInstruction.Builder subBuilder = null; + if (pdfInstruction_ != null) { + subBuilder = pdfInstruction_.toBuilder(); + } + pdfInstruction_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.PdfInstruction.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(pdfInstruction_); + pdfInstruction_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Instruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Instruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Instruction.class, + com.google.cloud.datalabeling.v1beta1.Instruction.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The display name of the instruction. Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The display name of the instruction. Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 3; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Optional. User-provided description of the instruction.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. User-provided description of the instruction.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Creation time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Creation time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Creation time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Last update time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Last update time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Last update time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int DATA_TYPE_FIELD_NUMBER = 6; + private int dataType_; + /** + * + * + *
+   * Required. The data type of this instruction.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 6; + */ + public int getDataTypeValue() { + return dataType_; + } + /** + * + * + *
+   * Required. The data type of this instruction.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 6; + */ + public com.google.cloud.datalabeling.v1beta1.DataType getDataType() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.DataType result = + com.google.cloud.datalabeling.v1beta1.DataType.valueOf(dataType_); + return result == null ? com.google.cloud.datalabeling.v1beta1.DataType.UNRECOGNIZED : result; + } + + public static final int CSV_INSTRUCTION_FIELD_NUMBER = 7; + private com.google.cloud.datalabeling.v1beta1.CsvInstruction csvInstruction_; + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a csv file, such as for classification task.
+   * Csv file should have exact two columns, in the format of:
+   * The first column is labeled data, such as image reference, text.
+   * The second column is comma separated labels associated with data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + public boolean hasCsvInstruction() { + return csvInstruction_ != null; + } + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a csv file, such as for classification task.
+   * Csv file should have exact two columns, in the format of:
+   * The first column is labeled data, such as image reference, text.
+   * The second column is comma separated labels associated with data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + public com.google.cloud.datalabeling.v1beta1.CsvInstruction getCsvInstruction() { + return csvInstruction_ == null + ? com.google.cloud.datalabeling.v1beta1.CsvInstruction.getDefaultInstance() + : csvInstruction_; + } + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a csv file, such as for classification task.
+   * Csv file should have exact two columns, in the format of:
+   * The first column is labeled data, such as image reference, text.
+   * The second column is comma separated labels associated with data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + public com.google.cloud.datalabeling.v1beta1.CsvInstructionOrBuilder + getCsvInstructionOrBuilder() { + return getCsvInstruction(); + } + + public static final int PDF_INSTRUCTION_FIELD_NUMBER = 9; + private com.google.cloud.datalabeling.v1beta1.PdfInstruction pdfInstruction_; + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + public boolean hasPdfInstruction() { + return pdfInstruction_ != null; + } + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + public com.google.cloud.datalabeling.v1beta1.PdfInstruction getPdfInstruction() { + return pdfInstruction_ == null + ? com.google.cloud.datalabeling.v1beta1.PdfInstruction.getDefaultInstance() + : pdfInstruction_; + } + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + public com.google.cloud.datalabeling.v1beta1.PdfInstructionOrBuilder + getPdfInstructionOrBuilder() { + return getPdfInstruction(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); + } + if (createTime_ != null) { + output.writeMessage(4, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (dataType_ + != com.google.cloud.datalabeling.v1beta1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, dataType_); + } + if (csvInstruction_ != null) { + output.writeMessage(7, getCsvInstruction()); + } + if (pdfInstruction_ != null) { + output.writeMessage(9, getPdfInstruction()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + if (dataType_ + != com.google.cloud.datalabeling.v1beta1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, dataType_); + } + if (csvInstruction_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCsvInstruction()); + } + if (pdfInstruction_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getPdfInstruction()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.Instruction)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.Instruction other = + (com.google.cloud.datalabeling.v1beta1.Instruction) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (dataType_ != other.dataType_) return false; + if (hasCsvInstruction() != other.hasCsvInstruction()) return false; + if (hasCsvInstruction()) { + if (!getCsvInstruction().equals(other.getCsvInstruction())) return false; + } + if (hasPdfInstruction() != other.hasPdfInstruction()) return false; + if (hasPdfInstruction()) { + if (!getPdfInstruction().equals(other.getPdfInstruction())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + DATA_TYPE_FIELD_NUMBER; + hash = (53 * hash) + dataType_; + if (hasCsvInstruction()) { + hash = (37 * hash) + CSV_INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getCsvInstruction().hashCode(); + } + if (hasPdfInstruction()) { + hash = (37 * hash) + PDF_INSTRUCTION_FIELD_NUMBER; + hash = (53 * hash) + getPdfInstruction().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.Instruction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Instruction of how to perform the labeling task for human operators.
+   * Currently two types of instruction are supported - CSV file and PDF.
+   * One of the two types instruction must be provided.
+   * CSV file is only supported for image classification task. Instructions for
+   * other task should be provided as PDF.
+   * For image classification, CSV and PDF can be provided at the same time.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Instruction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.Instruction) + com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Instruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Instruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Instruction.class, + com.google.cloud.datalabeling.v1beta1.Instruction.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.Instruction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + description_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + dataType_ = 0; + + if (csvInstructionBuilder_ == null) { + csvInstruction_ = null; + } else { + csvInstruction_ = null; + csvInstructionBuilder_ = null; + } + if (pdfInstructionBuilder_ == null) { + pdfInstruction_ = null; + } else { + pdfInstruction_ = null; + pdfInstructionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Instruction_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Instruction getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.Instruction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Instruction build() { + com.google.cloud.datalabeling.v1beta1.Instruction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Instruction buildPartial() { + com.google.cloud.datalabeling.v1beta1.Instruction result = + new com.google.cloud.datalabeling.v1beta1.Instruction(this); + result.name_ = name_; + result.displayName_ = displayName_; + result.description_ = description_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.dataType_ = dataType_; + if (csvInstructionBuilder_ == null) { + result.csvInstruction_ = csvInstruction_; + } else { + result.csvInstruction_ = csvInstructionBuilder_.build(); + } + if (pdfInstructionBuilder_ == null) { + result.pdfInstruction_ = pdfInstruction_; + } else { + result.pdfInstruction_ = pdfInstructionBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.Instruction) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.Instruction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.Instruction other) { + if (other == com.google.cloud.datalabeling.v1beta1.Instruction.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.dataType_ != 0) { + setDataTypeValue(other.getDataTypeValue()); + } + if (other.hasCsvInstruction()) { + mergeCsvInstruction(other.getCsvInstruction()); + } + if (other.hasPdfInstruction()) { + mergePdfInstruction(other.getPdfInstruction()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.Instruction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.Instruction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Instruction resource name, format:
+     * projects/{project_id}/instructions/{instruction_id}
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the instruction. Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The display name of the instruction. Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The display name of the instruction. Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the instruction. Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the instruction. Maximum of 64 characters.
+     * 
+ * + * string display_name = 2; + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. User-provided description of the instruction.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. User-provided description of the instruction.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. User-provided description of the instruction.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided description of the instruction.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User-provided description of the instruction.
+     * The description can be up to 10000 characters long.
+     * 
+ * + * string description = 3; + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Creation time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Creation time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Creation time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Creation time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Creation time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Creation time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Creation time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Creation time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Creation time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Last update time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Last update time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Last update time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Last update time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Last update time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Last update time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Last update time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Last update time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Last update time of instruction.
+     * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private int dataType_ = 0; + /** + * + * + *
+     * Required. The data type of this instruction.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 6; + */ + public int getDataTypeValue() { + return dataType_; + } + /** + * + * + *
+     * Required. The data type of this instruction.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 6; + */ + public Builder setDataTypeValue(int value) { + dataType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The data type of this instruction.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 6; + */ + public com.google.cloud.datalabeling.v1beta1.DataType getDataType() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.DataType result = + com.google.cloud.datalabeling.v1beta1.DataType.valueOf(dataType_); + return result == null ? com.google.cloud.datalabeling.v1beta1.DataType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Required. The data type of this instruction.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 6; + */ + public Builder setDataType(com.google.cloud.datalabeling.v1beta1.DataType value) { + if (value == null) { + throw new NullPointerException(); + } + + dataType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The data type of this instruction.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 6; + */ + public Builder clearDataType() { + + dataType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.CsvInstruction csvInstruction_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.CsvInstruction, + com.google.cloud.datalabeling.v1beta1.CsvInstruction.Builder, + com.google.cloud.datalabeling.v1beta1.CsvInstructionOrBuilder> + csvInstructionBuilder_; + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a csv file, such as for classification task.
+     * Csv file should have exact two columns, in the format of:
+     * The first column is labeled data, such as image reference, text.
+     * The second column is comma separated labels associated with data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + public boolean hasCsvInstruction() { + return csvInstructionBuilder_ != null || csvInstruction_ != null; + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a csv file, such as for classification task.
+     * Csv file should have exact two columns, in the format of:
+     * The first column is labeled data, such as image reference, text.
+     * The second column is comma separated labels associated with data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + public com.google.cloud.datalabeling.v1beta1.CsvInstruction getCsvInstruction() { + if (csvInstructionBuilder_ == null) { + return csvInstruction_ == null + ? com.google.cloud.datalabeling.v1beta1.CsvInstruction.getDefaultInstance() + : csvInstruction_; + } else { + return csvInstructionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a csv file, such as for classification task.
+     * Csv file should have exact two columns, in the format of:
+     * The first column is labeled data, such as image reference, text.
+     * The second column is comma separated labels associated with data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + public Builder setCsvInstruction(com.google.cloud.datalabeling.v1beta1.CsvInstruction value) { + if (csvInstructionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + csvInstruction_ = value; + onChanged(); + } else { + csvInstructionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a csv file, such as for classification task.
+     * Csv file should have exact two columns, in the format of:
+     * The first column is labeled data, such as image reference, text.
+     * The second column is comma separated labels associated with data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + public Builder setCsvInstruction( + com.google.cloud.datalabeling.v1beta1.CsvInstruction.Builder builderForValue) { + if (csvInstructionBuilder_ == null) { + csvInstruction_ = builderForValue.build(); + onChanged(); + } else { + csvInstructionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a csv file, such as for classification task.
+     * Csv file should have exact two columns, in the format of:
+     * The first column is labeled data, such as image reference, text.
+     * The second column is comma separated labels associated with data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + public Builder mergeCsvInstruction(com.google.cloud.datalabeling.v1beta1.CsvInstruction value) { + if (csvInstructionBuilder_ == null) { + if (csvInstruction_ != null) { + csvInstruction_ = + com.google.cloud.datalabeling.v1beta1.CsvInstruction.newBuilder(csvInstruction_) + .mergeFrom(value) + .buildPartial(); + } else { + csvInstruction_ = value; + } + onChanged(); + } else { + csvInstructionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a csv file, such as for classification task.
+     * Csv file should have exact two columns, in the format of:
+     * The first column is labeled data, such as image reference, text.
+     * The second column is comma separated labels associated with data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + public Builder clearCsvInstruction() { + if (csvInstructionBuilder_ == null) { + csvInstruction_ = null; + onChanged(); + } else { + csvInstruction_ = null; + csvInstructionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a csv file, such as for classification task.
+     * Csv file should have exact two columns, in the format of:
+     * The first column is labeled data, such as image reference, text.
+     * The second column is comma separated labels associated with data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + public com.google.cloud.datalabeling.v1beta1.CsvInstruction.Builder getCsvInstructionBuilder() { + + onChanged(); + return getCsvInstructionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a csv file, such as for classification task.
+     * Csv file should have exact two columns, in the format of:
+     * The first column is labeled data, such as image reference, text.
+     * The second column is comma separated labels associated with data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + public com.google.cloud.datalabeling.v1beta1.CsvInstructionOrBuilder + getCsvInstructionOrBuilder() { + if (csvInstructionBuilder_ != null) { + return csvInstructionBuilder_.getMessageOrBuilder(); + } else { + return csvInstruction_ == null + ? com.google.cloud.datalabeling.v1beta1.CsvInstruction.getDefaultInstance() + : csvInstruction_; + } + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a csv file, such as for classification task.
+     * Csv file should have exact two columns, in the format of:
+     * The first column is labeled data, such as image reference, text.
+     * The second column is comma separated labels associated with data.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.CsvInstruction, + com.google.cloud.datalabeling.v1beta1.CsvInstruction.Builder, + com.google.cloud.datalabeling.v1beta1.CsvInstructionOrBuilder> + getCsvInstructionFieldBuilder() { + if (csvInstructionBuilder_ == null) { + csvInstructionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.CsvInstruction, + com.google.cloud.datalabeling.v1beta1.CsvInstruction.Builder, + com.google.cloud.datalabeling.v1beta1.CsvInstructionOrBuilder>( + getCsvInstruction(), getParentForChildren(), isClean()); + csvInstruction_ = null; + } + return csvInstructionBuilder_; + } + + private com.google.cloud.datalabeling.v1beta1.PdfInstruction pdfInstruction_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.PdfInstruction, + com.google.cloud.datalabeling.v1beta1.PdfInstruction.Builder, + com.google.cloud.datalabeling.v1beta1.PdfInstructionOrBuilder> + pdfInstructionBuilder_; + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + public boolean hasPdfInstruction() { + return pdfInstructionBuilder_ != null || pdfInstruction_ != null; + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + public com.google.cloud.datalabeling.v1beta1.PdfInstruction getPdfInstruction() { + if (pdfInstructionBuilder_ == null) { + return pdfInstruction_ == null + ? com.google.cloud.datalabeling.v1beta1.PdfInstruction.getDefaultInstance() + : pdfInstruction_; + } else { + return pdfInstructionBuilder_.getMessage(); + } + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + public Builder setPdfInstruction(com.google.cloud.datalabeling.v1beta1.PdfInstruction value) { + if (pdfInstructionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + pdfInstruction_ = value; + onChanged(); + } else { + pdfInstructionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + public Builder setPdfInstruction( + com.google.cloud.datalabeling.v1beta1.PdfInstruction.Builder builderForValue) { + if (pdfInstructionBuilder_ == null) { + pdfInstruction_ = builderForValue.build(); + onChanged(); + } else { + pdfInstructionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + public Builder mergePdfInstruction(com.google.cloud.datalabeling.v1beta1.PdfInstruction value) { + if (pdfInstructionBuilder_ == null) { + if (pdfInstruction_ != null) { + pdfInstruction_ = + com.google.cloud.datalabeling.v1beta1.PdfInstruction.newBuilder(pdfInstruction_) + .mergeFrom(value) + .buildPartial(); + } else { + pdfInstruction_ = value; + } + onChanged(); + } else { + pdfInstructionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + public Builder clearPdfInstruction() { + if (pdfInstructionBuilder_ == null) { + pdfInstruction_ = null; + onChanged(); + } else { + pdfInstruction_ = null; + pdfInstructionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + public com.google.cloud.datalabeling.v1beta1.PdfInstruction.Builder getPdfInstructionBuilder() { + + onChanged(); + return getPdfInstructionFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + public com.google.cloud.datalabeling.v1beta1.PdfInstructionOrBuilder + getPdfInstructionOrBuilder() { + if (pdfInstructionBuilder_ != null) { + return pdfInstructionBuilder_.getMessageOrBuilder(); + } else { + return pdfInstruction_ == null + ? com.google.cloud.datalabeling.v1beta1.PdfInstruction.getDefaultInstance() + : pdfInstruction_; + } + } + /** + * + * + *
+     * One of CSV and PDF instruction is required.
+     * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.PdfInstruction, + com.google.cloud.datalabeling.v1beta1.PdfInstruction.Builder, + com.google.cloud.datalabeling.v1beta1.PdfInstructionOrBuilder> + getPdfInstructionFieldBuilder() { + if (pdfInstructionBuilder_ == null) { + pdfInstructionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.PdfInstruction, + com.google.cloud.datalabeling.v1beta1.PdfInstruction.Builder, + com.google.cloud.datalabeling.v1beta1.PdfInstructionOrBuilder>( + getPdfInstruction(), getParentForChildren(), isClean()); + pdfInstruction_ = null; + } + return pdfInstructionBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.Instruction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.Instruction) + private static final com.google.cloud.datalabeling.v1beta1.Instruction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.Instruction(); + } + + public static com.google.cloud.datalabeling.v1beta1.Instruction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instruction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Instruction(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Instruction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InstructionName.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InstructionName.java new file mode 100644 index 000000000000..be4593447e69 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InstructionName.java @@ -0,0 +1,180 @@ +/* + * 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.datalabeling.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 InstructionName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/instructions/{instruction}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String instruction; + + public String getProject() { + return project; + } + + public String getInstruction() { + return instruction; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private InstructionName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + instruction = Preconditions.checkNotNull(builder.getInstruction()); + } + + public static InstructionName of(String project, String instruction) { + return newBuilder().setProject(project).setInstruction(instruction).build(); + } + + public static String format(String project, String instruction) { + return newBuilder().setProject(project).setInstruction(instruction).build().toString(); + } + + public static InstructionName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "InstructionName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("instruction")); + } + + 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 (InstructionName 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("instruction", instruction); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "instruction", instruction); + } + + /** Builder for InstructionName. */ + public static class Builder { + + private String project; + private String instruction; + + public String getProject() { + return project; + } + + public String getInstruction() { + return instruction; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setInstruction(String instruction) { + this.instruction = instruction; + return this; + } + + private Builder() {} + + private Builder(InstructionName instructionName) { + project = instructionName.project; + instruction = instructionName.instruction; + } + + public InstructionName build() { + return new InstructionName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof InstructionName) { + InstructionName that = (InstructionName) o; + return (this.project.equals(that.project)) && (this.instruction.equals(that.instruction)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= instruction.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InstructionOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InstructionOrBuilder.java new file mode 100644 index 000000000000..824bdf899c8d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InstructionOrBuilder.java @@ -0,0 +1,237 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/instruction.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface InstructionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.Instruction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Instruction resource name, format:
+   * projects/{project_id}/instructions/{instruction_id}
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the instruction. Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the instruction. Maximum of 64 characters.
+   * 
+ * + * string display_name = 2; + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-provided description of the instruction.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. User-provided description of the instruction.
+   * The description can be up to 10000 characters long.
+   * 
+ * + * string description = 3; + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Output only. Creation time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Creation time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Creation time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Last update time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Last update time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Last update time of instruction.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Required. The data type of this instruction.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 6; + */ + int getDataTypeValue(); + /** + * + * + *
+   * Required. The data type of this instruction.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.DataType data_type = 6; + */ + com.google.cloud.datalabeling.v1beta1.DataType getDataType(); + + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a csv file, such as for classification task.
+   * Csv file should have exact two columns, in the format of:
+   * The first column is labeled data, such as image reference, text.
+   * The second column is comma separated labels associated with data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + boolean hasCsvInstruction(); + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a csv file, such as for classification task.
+   * Csv file should have exact two columns, in the format of:
+   * The first column is labeled data, such as image reference, text.
+   * The second column is comma separated labels associated with data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + com.google.cloud.datalabeling.v1beta1.CsvInstruction getCsvInstruction(); + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a csv file, such as for classification task.
+   * Csv file should have exact two columns, in the format of:
+   * The first column is labeled data, such as image reference, text.
+   * The second column is comma separated labels associated with data.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.CsvInstruction csv_instruction = 7; + */ + com.google.cloud.datalabeling.v1beta1.CsvInstructionOrBuilder getCsvInstructionOrBuilder(); + + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + boolean hasPdfInstruction(); + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + com.google.cloud.datalabeling.v1beta1.PdfInstruction getPdfInstruction(); + /** + * + * + *
+   * One of CSV and PDF instruction is required.
+   * Instruction from a PDF doc. The PDF doc should be in GCS bucket.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PdfInstruction pdf_instruction = 9; + */ + com.google.cloud.datalabeling.v1beta1.PdfInstructionOrBuilder getPdfInstructionOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InstructionOuterClass.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InstructionOuterClass.java new file mode 100644 index 000000000000..94bf8663d75c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/InstructionOuterClass.java @@ -0,0 +1,110 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/instruction.proto + +package com.google.cloud.datalabeling.v1beta1; + +public final class InstructionOuterClass { + private InstructionOuterClass() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_Instruction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_Instruction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_CsvInstruction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_CsvInstruction_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_PdfInstruction_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_PdfInstruction_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/datalabeling/v1beta1/inst" + + "ruction.proto\022!google.cloud.datalabeling" + + ".v1beta1\032/google/cloud/datalabeling/v1be" + + "ta1/dataset.proto\032\037google/protobuf/times" + + "tamp.proto\032\034google/api/annotations.proto" + + "\"\200\003\n\013Instruction\022\014\n\004name\030\001 \001(\t\022\024\n\014displa" + + "y_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022/\n\013cre" + + "ate_time\030\004 \001(\0132\032.google.protobuf.Timesta" + + "mp\022/\n\013update_time\030\005 \001(\0132\032.google.protobu" + + "f.Timestamp\022>\n\tdata_type\030\006 \001(\0162+.google." + + "cloud.datalabeling.v1beta1.DataType\022J\n\017c" + + "sv_instruction\030\007 \001(\01321.google.cloud.data" + + "labeling.v1beta1.CsvInstruction\022J\n\017pdf_i" + + "nstruction\030\t \001(\01321.google.cloud.datalabe" + + "ling.v1beta1.PdfInstruction\"&\n\016CsvInstru" + + "ction\022\024\n\014gcs_file_uri\030\001 \001(\t\"&\n\016PdfInstru" + + "ction\022\024\n\014gcs_file_uri\030\001 \001(\tBx\n%com.googl" + + "e.cloud.datalabeling.v1beta1P\001ZMgoogle.g" + + "olang.org/genproto/googleapis/cloud/data" + + "labeling/v1beta1;datalabelingb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.datalabeling.v1beta1.DatasetOuterClass.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }, + assigner); + internal_static_google_cloud_datalabeling_v1beta1_Instruction_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datalabeling_v1beta1_Instruction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_Instruction_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "Description", + "CreateTime", + "UpdateTime", + "DataType", + "CsvInstruction", + "PdfInstruction", + }); + internal_static_google_cloud_datalabeling_v1beta1_CsvInstruction_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datalabeling_v1beta1_CsvInstruction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_CsvInstruction_descriptor, + new java.lang.String[] { + "GcsFileUri", + }); + internal_static_google_cloud_datalabeling_v1beta1_PdfInstruction_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datalabeling_v1beta1_PdfInstruction_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_PdfInstruction_descriptor, + new java.lang.String[] { + "GcsFileUri", + }); + com.google.cloud.datalabeling.v1beta1.DatasetOuterClass.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioRequest.java new file mode 100644 index 000000000000..21136e97a9c0 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioRequest.java @@ -0,0 +1,1126 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for LabelAudio.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelAudioRequest} + */ +public final class LabelAudioRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelAudioRequest) + LabelAudioRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelAudioRequest.newBuilder() to construct. + private LabelAudioRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelAudioRequest() { + parent_ = ""; + feature_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelAudioRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + int rawValue = input.readEnum(); + + feature_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelAudioRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelAudioRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.class, + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Builder.class); + } + + /** + * + * + *
+   * Audio labeling task feature.
+   * 
+ * + * Protobuf enum {@code google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature} + */ + public enum Feature implements com.google.protobuf.ProtocolMessageEnum { + /** FEATURE_UNSPECIFIED = 0; */ + FEATURE_UNSPECIFIED(0), + /** + * + * + *
+     * Transcribe the audios into text.
+     * 
+ * + * AUDIO_TRANSCRIPTION = 1; + */ + AUDIO_TRANSCRIPTION(1), + UNRECOGNIZED(-1), + ; + + /** FEATURE_UNSPECIFIED = 0; */ + public static final int FEATURE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Transcribe the audios into text.
+     * 
+ * + * AUDIO_TRANSCRIPTION = 1; + */ + public static final int AUDIO_TRANSCRIPTION_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static Feature valueOf(int value) { + return forNumber(value); + } + + public static Feature forNumber(int value) { + switch (value) { + case 0: + return FEATURE_UNSPECIFIED; + case 1: + return AUDIO_TRANSCRIPTION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Feature findValueByNumber(int number) { + return Feature.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Feature[] VALUES = values(); + + public static Feature valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Feature(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature) + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + public static final int FEATURE_FIELD_NUMBER = 3; + private int feature_; + /** + * + * + *
+   * Required. The type of audio labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature feature = 3; + */ + public int getFeatureValue() { + return feature_; + } + /** + * + * + *
+   * Required. The type of audio labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature feature = 3; + */ + public com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature getFeature() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature result = + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature.valueOf(feature_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (basicConfig_ != null) { + output.writeMessage(2, getBasicConfig()); + } + if (feature_ + != com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature.FEATURE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, feature_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBasicConfig()); + } + if (feature_ + != com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature.FEATURE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, feature_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.LabelAudioRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest other = + (com.google.cloud.datalabeling.v1beta1.LabelAudioRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (feature_ != other.feature_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (37 * hash) + FEATURE_FIELD_NUMBER; + hash = (53 * hash) + feature_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for LabelAudio.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelAudioRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelAudioRequest) + com.google.cloud.datalabeling.v1beta1.LabelAudioRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelAudioRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelAudioRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.class, + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + feature_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelAudioRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelAudioRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelAudioRequest build() { + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelAudioRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest result = + new com.google.cloud.datalabeling.v1beta1.LabelAudioRequest(this); + result.parent_ = parent_; + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + result.feature_ = feature_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.LabelAudioRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.LabelAudioRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.LabelAudioRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + if (other.feature_ != 0) { + setFeatureValue(other.getFeatureValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelAudioRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + private int feature_ = 0; + /** + * + * + *
+     * Required. The type of audio labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature feature = 3; + */ + public int getFeatureValue() { + return feature_; + } + /** + * + * + *
+     * Required. The type of audio labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature feature = 3; + */ + public Builder setFeatureValue(int value) { + feature_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of audio labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature feature = 3; + */ + public com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature getFeature() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature result = + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature.valueOf(feature_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The type of audio labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature feature = 3; + */ + public Builder setFeature( + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature value) { + if (value == null) { + throw new NullPointerException(); + } + + feature_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of audio labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature feature = 3; + */ + public Builder clearFeature() { + + feature_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelAudioRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelAudioRequest) + private static final com.google.cloud.datalabeling.v1beta1.LabelAudioRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.LabelAudioRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelAudioRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelAudioRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelAudioRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioRequestOrBuilder.java new file mode 100644 index 000000000000..238bbbfd9c30 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioRequestOrBuilder.java @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelAudioRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelAudioRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); + + /** + * + * + *
+   * Required. The type of audio labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature feature = 3; + */ + int getFeatureValue(); + /** + * + * + *
+   * Required. The type of audio labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature feature = 3; + */ + com.google.cloud.datalabeling.v1beta1.LabelAudioRequest.Feature getFeature(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioTranscriptionOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioTranscriptionOperationMetadata.java new file mode 100644 index 000000000000..6a36e0ed3a12 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioTranscriptionOperationMetadata.java @@ -0,0 +1,728 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata} + */ +public final class LabelAudioTranscriptionOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + LabelAudioTranscriptionOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelAudioTranscriptionOperationMetadata.newBuilder() to construct. + private LabelAudioTranscriptionOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelAudioTranscriptionOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelAudioTranscriptionOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelAudioTranscriptionOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelAudioTranscriptionOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata.Builder + .class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelAudioTranscriptionOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelAudioTranscriptionOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelAudioTranscriptionOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata(this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1 + .LabelAudioTranscriptionOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelAudioTranscriptionOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelAudioTranscriptionOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioTranscriptionOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioTranscriptionOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..88ad4db082f5 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelAudioTranscriptionOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelAudioTranscriptionOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingBoxOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingBoxOperationMetadata.java new file mode 100644 index 000000000000..560f010ceabd --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingBoxOperationMetadata.java @@ -0,0 +1,736 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Details of a LabelImageBoundingBox operation metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata} + */ +public final class LabelImageBoundingBoxOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + LabelImageBoundingBoxOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelImageBoundingBoxOperationMetadata.newBuilder() to construct. + private LabelImageBoundingBoxOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelImageBoundingBoxOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelImageBoundingBoxOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingBoxOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingBoxOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata.Builder + .class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a LabelImageBoundingBox operation metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingBoxOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingBoxOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingBoxOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata(this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelImageBoundingBoxOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelImageBoundingBoxOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingBoxOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingBoxOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..a71102e8dc99 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingBoxOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelImageBoundingBoxOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingPolyOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingPolyOperationMetadata.java new file mode 100644 index 000000000000..d21909da8eff --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingPolyOperationMetadata.java @@ -0,0 +1,737 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Details of LabelImageBoundingPoly operation metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata} + */ +public final class LabelImageBoundingPolyOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + LabelImageBoundingPolyOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelImageBoundingPolyOperationMetadata.newBuilder() to construct. + private LabelImageBoundingPolyOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelImageBoundingPolyOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelImageBoundingPolyOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingPolyOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingPolyOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata.Builder + .class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of LabelImageBoundingPoly operation metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingPolyOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingPolyOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingPolyOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata(this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelImageBoundingPolyOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelImageBoundingPolyOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingPolyOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingPolyOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..1825948013ed --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageBoundingPolyOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelImageBoundingPolyOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageClassificationOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageClassificationOperationMetadata.java new file mode 100644 index 000000000000..bbb697f2f0d9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageClassificationOperationMetadata.java @@ -0,0 +1,742 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Metadata of a LabelImageClassification operation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata} + */ +public final class LabelImageClassificationOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + LabelImageClassificationOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelImageClassificationOperationMetadata.newBuilder() to construct. + private LabelImageClassificationOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelImageClassificationOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelImageClassificationOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageClassificationOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageClassificationOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata.Builder + .class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata of a LabelImageClassification operation.
+   * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageClassificationOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageClassificationOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageClassificationOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata(this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1 + .LabelImageClassificationOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelImageClassificationOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelImageClassificationOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageClassificationOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageClassificationOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..a4364984cd2f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageClassificationOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelImageClassificationOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageOrientedBoundingBoxOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageOrientedBoundingBoxOperationMetadata.java new file mode 100644 index 000000000000..c7f532aa1cf6 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageOrientedBoundingBoxOperationMetadata.java @@ -0,0 +1,752 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Details of a LabelImageOrientedBoundingBox operation metadata.
+ * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata} + */ +public final class LabelImageOrientedBoundingBoxOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) + LabelImageOrientedBoundingBoxOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelImageOrientedBoundingBoxOperationMetadata.newBuilder() to construct. + private LabelImageOrientedBoundingBoxOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelImageOrientedBoundingBoxOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelImageOrientedBoundingBoxOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageOrientedBoundingBoxOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageOrientedBoundingBoxOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .class, + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .Builder.class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a LabelImageOrientedBoundingBox operation metadata.
+   * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) + com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageOrientedBoundingBoxOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageOrientedBoundingBoxOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .class, + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageOrientedBoundingBoxOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + build() { + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata( + this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelImageOrientedBoundingBoxOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelImageOrientedBoundingBoxOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser + parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser + getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageOrientedBoundingBoxOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageOrientedBoundingBoxOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..ee26537ae024 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageOrientedBoundingBoxOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelImageOrientedBoundingBoxOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImagePolylineOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImagePolylineOperationMetadata.java new file mode 100644 index 000000000000..28cb4fe87929 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImagePolylineOperationMetadata.java @@ -0,0 +1,731 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Details of LabelImagePolyline operation metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata} + */ +public final class LabelImagePolylineOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + LabelImagePolylineOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelImagePolylineOperationMetadata.newBuilder() to construct. + private LabelImagePolylineOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelImagePolylineOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelImagePolylineOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImagePolylineOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImagePolylineOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.Builder + .class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of LabelImagePolyline operation metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImagePolylineOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImagePolylineOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImagePolylineOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata(this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelImagePolylineOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelImagePolylineOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImagePolylineOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImagePolylineOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..c86dc57736d5 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImagePolylineOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelImagePolylineOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageRequest.java new file mode 100644 index 000000000000..67d75dcbe919 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageRequest.java @@ -0,0 +1,2650 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for starting an image labeling task.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelImageRequest} + */ +public final class LabelImageRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelImageRequest) + LabelImageRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelImageRequest.newBuilder() to construct. + private LabelImageRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelImageRequest() { + parent_ = ""; + feature_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelImageRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + int rawValue = input.readEnum(); + + feature_ = rawValue; + break; + } + case 34: + { + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder subBuilder = + null; + if (requestConfigCase_ == 4) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + requestConfig_) + .toBuilder(); + } + requestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + requestConfig_); + requestConfig_ = subBuilder.buildPartial(); + } + requestConfigCase_ = 4; + break; + } + case 42: + { + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder subBuilder = null; + if (requestConfigCase_ == 5) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) requestConfig_) + .toBuilder(); + } + requestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) requestConfig_); + requestConfig_ = subBuilder.buildPartial(); + } + requestConfigCase_ = 5; + break; + } + case 50: + { + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder subBuilder = null; + if (requestConfigCase_ == 6) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.PolylineConfig) requestConfig_) + .toBuilder(); + } + requestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.PolylineConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.PolylineConfig) requestConfig_); + requestConfig_ = subBuilder.buildPartial(); + } + requestConfigCase_ = 6; + break; + } + case 58: + { + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder subBuilder = null; + if (requestConfigCase_ == 7) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.SegmentationConfig) requestConfig_) + .toBuilder(); + } + requestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) requestConfig_); + requestConfig_ = subBuilder.buildPartial(); + } + requestConfigCase_ = 7; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageRequest.class, + com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Builder.class); + } + + /** + * + * + *
+   * Image labeling task feature.
+   * 
+ * + * Protobuf enum {@code google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature} + */ + public enum Feature implements com.google.protobuf.ProtocolMessageEnum { + /** FEATURE_UNSPECIFIED = 0; */ + FEATURE_UNSPECIFIED(0), + /** + * + * + *
+     * Label whole image with one or more of labels.
+     * 
+ * + * CLASSIFICATION = 1; + */ + CLASSIFICATION(1), + /** + * + * + *
+     * Label image with bounding boxes for labels.
+     * 
+ * + * BOUNDING_BOX = 2; + */ + BOUNDING_BOX(2), + /** + * + * + *
+     * Label oriented bounding box. The box does not have to be parallel to
+     * horizontal line.
+     * 
+ * + * ORIENTED_BOUNDING_BOX = 6; + */ + ORIENTED_BOUNDING_BOX(6), + /** + * + * + *
+     * Label images with bounding poly. A bounding poly is a plane figure that
+     * is bounded by a finite chain of straight line segments closing in a loop.
+     * 
+ * + * BOUNDING_POLY = 3; + */ + BOUNDING_POLY(3), + /** + * + * + *
+     * Label images with polyline. Polyline is formed by connected line segments
+     * which are not in closed form.
+     * 
+ * + * POLYLINE = 4; + */ + POLYLINE(4), + /** + * + * + *
+     * Label images with segmentation. Segmentation is different from bounding
+     * poly since it is more fine-grained, pixel level annotation.
+     * 
+ * + * SEGMENTATION = 5; + */ + SEGMENTATION(5), + UNRECOGNIZED(-1), + ; + + /** FEATURE_UNSPECIFIED = 0; */ + public static final int FEATURE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Label whole image with one or more of labels.
+     * 
+ * + * CLASSIFICATION = 1; + */ + public static final int CLASSIFICATION_VALUE = 1; + /** + * + * + *
+     * Label image with bounding boxes for labels.
+     * 
+ * + * BOUNDING_BOX = 2; + */ + public static final int BOUNDING_BOX_VALUE = 2; + /** + * + * + *
+     * Label oriented bounding box. The box does not have to be parallel to
+     * horizontal line.
+     * 
+ * + * ORIENTED_BOUNDING_BOX = 6; + */ + public static final int ORIENTED_BOUNDING_BOX_VALUE = 6; + /** + * + * + *
+     * Label images with bounding poly. A bounding poly is a plane figure that
+     * is bounded by a finite chain of straight line segments closing in a loop.
+     * 
+ * + * BOUNDING_POLY = 3; + */ + public static final int BOUNDING_POLY_VALUE = 3; + /** + * + * + *
+     * Label images with polyline. Polyline is formed by connected line segments
+     * which are not in closed form.
+     * 
+ * + * POLYLINE = 4; + */ + public static final int POLYLINE_VALUE = 4; + /** + * + * + *
+     * Label images with segmentation. Segmentation is different from bounding
+     * poly since it is more fine-grained, pixel level annotation.
+     * 
+ * + * SEGMENTATION = 5; + */ + public static final int SEGMENTATION_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static Feature valueOf(int value) { + return forNumber(value); + } + + public static Feature forNumber(int value) { + switch (value) { + case 0: + return FEATURE_UNSPECIFIED; + case 1: + return CLASSIFICATION; + case 2: + return BOUNDING_BOX; + case 6: + return ORIENTED_BOUNDING_BOX; + case 3: + return BOUNDING_POLY; + case 4: + return POLYLINE; + case 5: + return SEGMENTATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Feature findValueByNumber(int number) { + return Feature.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.LabelImageRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Feature[] VALUES = values(); + + public static Feature valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Feature(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature) + } + + private int requestConfigCase_ = 0; + private java.lang.Object requestConfig_; + + public enum RequestConfigCase implements com.google.protobuf.Internal.EnumLite { + IMAGE_CLASSIFICATION_CONFIG(4), + BOUNDING_POLY_CONFIG(5), + POLYLINE_CONFIG(6), + SEGMENTATION_CONFIG(7), + REQUESTCONFIG_NOT_SET(0); + private final int value; + + private RequestConfigCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static RequestConfigCase valueOf(int value) { + return forNumber(value); + } + + public static RequestConfigCase forNumber(int value) { + switch (value) { + case 4: + return IMAGE_CLASSIFICATION_CONFIG; + case 5: + return BOUNDING_POLY_CONFIG; + case 6: + return POLYLINE_CONFIG; + case 7: + return SEGMENTATION_CONFIG; + case 0: + return REQUESTCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RequestConfigCase getRequestConfigCase() { + return RequestConfigCase.forNumber(requestConfigCase_); + } + + public static final int IMAGE_CLASSIFICATION_CONFIG_FIELD_NUMBER = 4; + /** + * + * + *
+   * Configuration for image classification task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + public boolean hasImageClassificationConfig() { + return requestConfigCase_ == 4; + } + /** + * + * + *
+   * Configuration for image classification task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig + getImageClassificationConfig() { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for image classification task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder + getImageClassificationConfigOrBuilder() { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } + + public static final int BOUNDING_POLY_CONFIG_FIELD_NUMBER = 5; + /** + * + * + *
+   * Configuration for bounding box and bounding poly task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + public boolean hasBoundingPolyConfig() { + return requestConfigCase_ == 5; + } + /** + * + * + *
+   * Configuration for bounding box and bounding poly task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig getBoundingPolyConfig() { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for bounding box and bounding poly task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder + getBoundingPolyConfigOrBuilder() { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } + + public static final int POLYLINE_CONFIG_FIELD_NUMBER = 6; + /** + * + * + *
+   * Configuration for polyline task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + public boolean hasPolylineConfig() { + return requestConfigCase_ == 6; + } + /** + * + * + *
+   * Configuration for polyline task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + public com.google.cloud.datalabeling.v1beta1.PolylineConfig getPolylineConfig() { + if (requestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.PolylineConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for polyline task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + public com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder + getPolylineConfigOrBuilder() { + if (requestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.PolylineConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } + + public static final int SEGMENTATION_CONFIG_FIELD_NUMBER = 7; + /** + * + * + *
+   * Configuration for segmentation task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + public boolean hasSegmentationConfig() { + return requestConfigCase_ == 7; + } + /** + * + * + *
+   * Configuration for segmentation task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + public com.google.cloud.datalabeling.v1beta1.SegmentationConfig getSegmentationConfig() { + if (requestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for segmentation task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + public com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder + getSegmentationConfigOrBuilder() { + if (requestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + public static final int FEATURE_FIELD_NUMBER = 3; + private int feature_; + /** + * + * + *
+   * Required. The type of image labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3; + */ + public int getFeatureValue() { + return feature_; + } + /** + * + * + *
+   * Required. The type of image labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3; + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature getFeature() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature result = + com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature.valueOf(feature_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (basicConfig_ != null) { + output.writeMessage(2, getBasicConfig()); + } + if (feature_ + != com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature.FEATURE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, feature_); + } + if (requestConfigCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) requestConfig_); + } + if (requestConfigCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) requestConfig_); + } + if (requestConfigCase_ == 6) { + output.writeMessage(6, (com.google.cloud.datalabeling.v1beta1.PolylineConfig) requestConfig_); + } + if (requestConfigCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) requestConfig_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBasicConfig()); + } + if (feature_ + != com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature.FEATURE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, feature_); + } + if (requestConfigCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) requestConfig_); + } + if (requestConfigCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) requestConfig_); + } + if (requestConfigCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.datalabeling.v1beta1.PolylineConfig) requestConfig_); + } + if (requestConfigCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) requestConfig_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.LabelImageRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelImageRequest other = + (com.google.cloud.datalabeling.v1beta1.LabelImageRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (feature_ != other.feature_) return false; + if (!getRequestConfigCase().equals(other.getRequestConfigCase())) return false; + switch (requestConfigCase_) { + case 4: + if (!getImageClassificationConfig().equals(other.getImageClassificationConfig())) + return false; + break; + case 5: + if (!getBoundingPolyConfig().equals(other.getBoundingPolyConfig())) return false; + break; + case 6: + if (!getPolylineConfig().equals(other.getPolylineConfig())) return false; + break; + case 7: + if (!getSegmentationConfig().equals(other.getSegmentationConfig())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (37 * hash) + FEATURE_FIELD_NUMBER; + hash = (53 * hash) + feature_; + switch (requestConfigCase_) { + case 4: + hash = (37 * hash) + IMAGE_CLASSIFICATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getImageClassificationConfig().hashCode(); + break; + case 5: + hash = (37 * hash) + BOUNDING_POLY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPolyConfig().hashCode(); + break; + case 6: + hash = (37 * hash) + POLYLINE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPolylineConfig().hashCode(); + break; + case 7: + hash = (37 * hash) + SEGMENTATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSegmentationConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelImageRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for starting an image labeling task.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelImageRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelImageRequest) + com.google.cloud.datalabeling.v1beta1.LabelImageRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageRequest.class, + com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.LabelImageRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + feature_ = 0; + + requestConfigCase_ = 0; + requestConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelImageRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageRequest build() { + com.google.cloud.datalabeling.v1beta1.LabelImageRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelImageRequest result = + new com.google.cloud.datalabeling.v1beta1.LabelImageRequest(this); + if (requestConfigCase_ == 4) { + if (imageClassificationConfigBuilder_ == null) { + result.requestConfig_ = requestConfig_; + } else { + result.requestConfig_ = imageClassificationConfigBuilder_.build(); + } + } + if (requestConfigCase_ == 5) { + if (boundingPolyConfigBuilder_ == null) { + result.requestConfig_ = requestConfig_; + } else { + result.requestConfig_ = boundingPolyConfigBuilder_.build(); + } + } + if (requestConfigCase_ == 6) { + if (polylineConfigBuilder_ == null) { + result.requestConfig_ = requestConfig_; + } else { + result.requestConfig_ = polylineConfigBuilder_.build(); + } + } + if (requestConfigCase_ == 7) { + if (segmentationConfigBuilder_ == null) { + result.requestConfig_ = requestConfig_; + } else { + result.requestConfig_ = segmentationConfigBuilder_.build(); + } + } + result.parent_ = parent_; + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + result.feature_ = feature_; + result.requestConfigCase_ = requestConfigCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.LabelImageRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.LabelImageRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.LabelImageRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.LabelImageRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + if (other.feature_ != 0) { + setFeatureValue(other.getFeatureValue()); + } + switch (other.getRequestConfigCase()) { + case IMAGE_CLASSIFICATION_CONFIG: + { + mergeImageClassificationConfig(other.getImageClassificationConfig()); + break; + } + case BOUNDING_POLY_CONFIG: + { + mergeBoundingPolyConfig(other.getBoundingPolyConfig()); + break; + } + case POLYLINE_CONFIG: + { + mergePolylineConfig(other.getPolylineConfig()); + break; + } + case SEGMENTATION_CONFIG: + { + mergeSegmentationConfig(other.getSegmentationConfig()); + break; + } + case REQUESTCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelImageRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelImageRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int requestConfigCase_ = 0; + private java.lang.Object requestConfig_; + + public RequestConfigCase getRequestConfigCase() { + return RequestConfigCase.forNumber(requestConfigCase_); + } + + public Builder clearRequestConfig() { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder> + imageClassificationConfigBuilder_; + /** + * + * + *
+     * Configuration for image classification task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + public boolean hasImageClassificationConfig() { + return requestConfigCase_ == 4; + } + /** + * + * + *
+     * Configuration for image classification task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig + getImageClassificationConfig() { + if (imageClassificationConfigBuilder_ == null) { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } else { + if (requestConfigCase_ == 4) { + return imageClassificationConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for image classification task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + public Builder setImageClassificationConfig( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig value) { + if (imageClassificationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestConfig_ = value; + onChanged(); + } else { + imageClassificationConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for image classification task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + public Builder setImageClassificationConfig( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder builderForValue) { + if (imageClassificationConfigBuilder_ == null) { + requestConfig_ = builderForValue.build(); + onChanged(); + } else { + imageClassificationConfigBuilder_.setMessage(builderForValue.build()); + } + requestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for image classification task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + public Builder mergeImageClassificationConfig( + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig value) { + if (imageClassificationConfigBuilder_ == null) { + if (requestConfigCase_ == 4 + && requestConfig_ + != com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig + .getDefaultInstance()) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) + requestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + requestConfig_ = value; + } + onChanged(); + } else { + if (requestConfigCase_ == 4) { + imageClassificationConfigBuilder_.mergeFrom(value); + } + imageClassificationConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for image classification task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + public Builder clearImageClassificationConfig() { + if (imageClassificationConfigBuilder_ == null) { + if (requestConfigCase_ == 4) { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + } + } else { + if (requestConfigCase_ == 4) { + requestConfigCase_ = 0; + requestConfig_ = null; + } + imageClassificationConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for image classification task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder + getImageClassificationConfigBuilder() { + return getImageClassificationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for image classification task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder + getImageClassificationConfigOrBuilder() { + if ((requestConfigCase_ == 4) && (imageClassificationConfigBuilder_ != null)) { + return imageClassificationConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for image classification task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder> + getImageClassificationConfigFieldBuilder() { + if (imageClassificationConfigBuilder_ == null) { + if (!(requestConfigCase_ == 4)) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.getDefaultInstance(); + } + imageClassificationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig) requestConfig_, + getParentForChildren(), + isClean()); + requestConfig_ = null; + } + requestConfigCase_ = 4; + onChanged(); + ; + return imageClassificationConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder> + boundingPolyConfigBuilder_; + /** + * + * + *
+     * Configuration for bounding box and bounding poly task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + public boolean hasBoundingPolyConfig() { + return requestConfigCase_ == 5; + } + /** + * + * + *
+     * Configuration for bounding box and bounding poly task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig getBoundingPolyConfig() { + if (boundingPolyConfigBuilder_ == null) { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } else { + if (requestConfigCase_ == 5) { + return boundingPolyConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for bounding box and bounding poly task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + public Builder setBoundingPolyConfig( + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig value) { + if (boundingPolyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestConfig_ = value; + onChanged(); + } else { + boundingPolyConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for bounding box and bounding poly task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + public Builder setBoundingPolyConfig( + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder builderForValue) { + if (boundingPolyConfigBuilder_ == null) { + requestConfig_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyConfigBuilder_.setMessage(builderForValue.build()); + } + requestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for bounding box and bounding poly task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + public Builder mergeBoundingPolyConfig( + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig value) { + if (boundingPolyConfigBuilder_ == null) { + if (requestConfigCase_ == 5 + && requestConfig_ + != com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance()) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) requestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + requestConfig_ = value; + } + onChanged(); + } else { + if (requestConfigCase_ == 5) { + boundingPolyConfigBuilder_.mergeFrom(value); + } + boundingPolyConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for bounding box and bounding poly task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + public Builder clearBoundingPolyConfig() { + if (boundingPolyConfigBuilder_ == null) { + if (requestConfigCase_ == 5) { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + } + } else { + if (requestConfigCase_ == 5) { + requestConfigCase_ = 0; + requestConfig_ = null; + } + boundingPolyConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for bounding box and bounding poly task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder + getBoundingPolyConfigBuilder() { + return getBoundingPolyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for bounding box and bounding poly task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder + getBoundingPolyConfigOrBuilder() { + if ((requestConfigCase_ == 5) && (boundingPolyConfigBuilder_ != null)) { + return boundingPolyConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for bounding box and bounding poly task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder> + getBoundingPolyConfigFieldBuilder() { + if (boundingPolyConfigBuilder_ == null) { + if (!(requestConfigCase_ == 5)) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.getDefaultInstance(); + } + boundingPolyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig) requestConfig_, + getParentForChildren(), + isClean()); + requestConfig_ = null; + } + requestConfigCase_ = 5; + onChanged(); + ; + return boundingPolyConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.PolylineConfig, + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder, + com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder> + polylineConfigBuilder_; + /** + * + * + *
+     * Configuration for polyline task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + public boolean hasPolylineConfig() { + return requestConfigCase_ == 6; + } + /** + * + * + *
+     * Configuration for polyline task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + public com.google.cloud.datalabeling.v1beta1.PolylineConfig getPolylineConfig() { + if (polylineConfigBuilder_ == null) { + if (requestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.PolylineConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } else { + if (requestConfigCase_ == 6) { + return polylineConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for polyline task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + public Builder setPolylineConfig(com.google.cloud.datalabeling.v1beta1.PolylineConfig value) { + if (polylineConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestConfig_ = value; + onChanged(); + } else { + polylineConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Configuration for polyline task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + public Builder setPolylineConfig( + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder builderForValue) { + if (polylineConfigBuilder_ == null) { + requestConfig_ = builderForValue.build(); + onChanged(); + } else { + polylineConfigBuilder_.setMessage(builderForValue.build()); + } + requestConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Configuration for polyline task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + public Builder mergePolylineConfig(com.google.cloud.datalabeling.v1beta1.PolylineConfig value) { + if (polylineConfigBuilder_ == null) { + if (requestConfigCase_ == 6 + && requestConfig_ + != com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance()) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.PolylineConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.PolylineConfig) requestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + requestConfig_ = value; + } + onChanged(); + } else { + if (requestConfigCase_ == 6) { + polylineConfigBuilder_.mergeFrom(value); + } + polylineConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Configuration for polyline task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + public Builder clearPolylineConfig() { + if (polylineConfigBuilder_ == null) { + if (requestConfigCase_ == 6) { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + } + } else { + if (requestConfigCase_ == 6) { + requestConfigCase_ = 0; + requestConfig_ = null; + } + polylineConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for polyline task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + public com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder getPolylineConfigBuilder() { + return getPolylineConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for polyline task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + public com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder + getPolylineConfigOrBuilder() { + if ((requestConfigCase_ == 6) && (polylineConfigBuilder_ != null)) { + return polylineConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.PolylineConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for polyline task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.PolylineConfig, + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder, + com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder> + getPolylineConfigFieldBuilder() { + if (polylineConfigBuilder_ == null) { + if (!(requestConfigCase_ == 6)) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } + polylineConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.PolylineConfig, + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder, + com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.PolylineConfig) requestConfig_, + getParentForChildren(), + isClean()); + requestConfig_ = null; + } + requestConfigCase_ = 6; + onChanged(); + ; + return polylineConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.SegmentationConfig, + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder> + segmentationConfigBuilder_; + /** + * + * + *
+     * Configuration for segmentation task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + public boolean hasSegmentationConfig() { + return requestConfigCase_ == 7; + } + /** + * + * + *
+     * Configuration for segmentation task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + public com.google.cloud.datalabeling.v1beta1.SegmentationConfig getSegmentationConfig() { + if (segmentationConfigBuilder_ == null) { + if (requestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } else { + if (requestConfigCase_ == 7) { + return segmentationConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for segmentation task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + public Builder setSegmentationConfig( + com.google.cloud.datalabeling.v1beta1.SegmentationConfig value) { + if (segmentationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestConfig_ = value; + onChanged(); + } else { + segmentationConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Configuration for segmentation task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + public Builder setSegmentationConfig( + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder builderForValue) { + if (segmentationConfigBuilder_ == null) { + requestConfig_ = builderForValue.build(); + onChanged(); + } else { + segmentationConfigBuilder_.setMessage(builderForValue.build()); + } + requestConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Configuration for segmentation task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + public Builder mergeSegmentationConfig( + com.google.cloud.datalabeling.v1beta1.SegmentationConfig value) { + if (segmentationConfigBuilder_ == null) { + if (requestConfigCase_ == 7 + && requestConfig_ + != com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance()) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) requestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + requestConfig_ = value; + } + onChanged(); + } else { + if (requestConfigCase_ == 7) { + segmentationConfigBuilder_.mergeFrom(value); + } + segmentationConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Configuration for segmentation task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + public Builder clearSegmentationConfig() { + if (segmentationConfigBuilder_ == null) { + if (requestConfigCase_ == 7) { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + } + } else { + if (requestConfigCase_ == 7) { + requestConfigCase_ = 0; + requestConfig_ = null; + } + segmentationConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for segmentation task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + public com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder + getSegmentationConfigBuilder() { + return getSegmentationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for segmentation task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + public com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder + getSegmentationConfigOrBuilder() { + if ((requestConfigCase_ == 7) && (segmentationConfigBuilder_ != null)) { + return segmentationConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for segmentation task.
+     * One of image_classification_config, bounding_poly_config,
+     * polyline_config and segmentation_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.SegmentationConfig, + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder> + getSegmentationConfigFieldBuilder() { + if (segmentationConfigBuilder_ == null) { + if (!(requestConfigCase_ == 7)) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } + segmentationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.SegmentationConfig, + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) requestConfig_, + getParentForChildren(), + isClean()); + requestConfig_ = null; + } + requestConfigCase_ = 7; + onChanged(); + ; + return segmentationConfigBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + private int feature_ = 0; + /** + * + * + *
+     * Required. The type of image labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3; + */ + public int getFeatureValue() { + return feature_; + } + /** + * + * + *
+     * Required. The type of image labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3; + */ + public Builder setFeatureValue(int value) { + feature_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of image labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3; + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature getFeature() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature result = + com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature.valueOf(feature_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The type of image labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3; + */ + public Builder setFeature( + com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature value) { + if (value == null) { + throw new NullPointerException(); + } + + feature_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of image labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3; + */ + public Builder clearFeature() { + + feature_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelImageRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelImageRequest) + private static final com.google.cloud.datalabeling.v1beta1.LabelImageRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.LabelImageRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelImageRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelImageRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageRequestOrBuilder.java new file mode 100644 index 000000000000..a150b31fa6af --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageRequestOrBuilder.java @@ -0,0 +1,245 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelImageRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelImageRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Configuration for image classification task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + boolean hasImageClassificationConfig(); + /** + * + * + *
+   * Configuration for image classification task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfig getImageClassificationConfig(); + /** + * + * + *
+   * Configuration for image classification task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4; + * + */ + com.google.cloud.datalabeling.v1beta1.ImageClassificationConfigOrBuilder + getImageClassificationConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for bounding box and bounding poly task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + boolean hasBoundingPolyConfig(); + /** + * + * + *
+   * Configuration for bounding box and bounding poly task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfig getBoundingPolyConfig(); + /** + * + * + *
+   * Configuration for bounding box and bounding poly task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5; + */ + com.google.cloud.datalabeling.v1beta1.BoundingPolyConfigOrBuilder + getBoundingPolyConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for polyline task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + boolean hasPolylineConfig(); + /** + * + * + *
+   * Configuration for polyline task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + com.google.cloud.datalabeling.v1beta1.PolylineConfig getPolylineConfig(); + /** + * + * + *
+   * Configuration for polyline task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6; + */ + com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder getPolylineConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for segmentation task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + boolean hasSegmentationConfig(); + /** + * + * + *
+   * Configuration for segmentation task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + com.google.cloud.datalabeling.v1beta1.SegmentationConfig getSegmentationConfig(); + /** + * + * + *
+   * Configuration for segmentation task.
+   * One of image_classification_config, bounding_poly_config,
+   * polyline_config and segmentation_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7; + */ + com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder + getSegmentationConfigOrBuilder(); + + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); + + /** + * + * + *
+   * Required. The type of image labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3; + */ + int getFeatureValue(); + /** + * + * + *
+   * Required. The type of image labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3; + */ + com.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature getFeature(); + + public com.google.cloud.datalabeling.v1beta1.LabelImageRequest.RequestConfigCase + getRequestConfigCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageSegmentationOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageSegmentationOperationMetadata.java new file mode 100644 index 000000000000..bd8d982e4f1f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageSegmentationOperationMetadata.java @@ -0,0 +1,737 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Details of a LabelImageSegmentation operation metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata} + */ +public final class LabelImageSegmentationOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + LabelImageSegmentationOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelImageSegmentationOperationMetadata.newBuilder() to construct. + private LabelImageSegmentationOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelImageSegmentationOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelImageSegmentationOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageSegmentationOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageSegmentationOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata.Builder + .class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a LabelImageSegmentation operation metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageSegmentationOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageSegmentationOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelImageSegmentationOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata(this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelImageSegmentationOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelImageSegmentationOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageSegmentationOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageSegmentationOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..e4721c133568 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelImageSegmentationOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelImageSegmentationOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelOperationMetadata.java new file mode 100644 index 000000000000..156783938ced --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelOperationMetadata.java @@ -0,0 +1,4845 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Metadata of a labeling operation, such as LabelImage or LabelVideo.
+ * Next tag: 16
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelOperationMetadata} + */ +public final class LabelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelOperationMetadata) + LabelOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelOperationMetadata.newBuilder() to construct. + private LabelOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelOperationMetadata() { + partialFailures_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + progressPercent_ = input.readInt32(); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + partialFailures_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + partialFailures_.add( + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); + break; + } + case 26: + { + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .Builder + subBuilder = null; + if (detailsCase_ == 3) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1 + .LabelImageClassificationOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1 + .LabelImageClassificationOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1 + .LabelImageClassificationOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 3; + break; + } + case 34: + { + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata.Builder + subBuilder = null; + if (detailsCase_ == 4) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 4; + break; + } + case 42: + { + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .Builder + subBuilder = null; + if (detailsCase_ == 5) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1 + .LabelVideoClassificationOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1 + .LabelVideoClassificationOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1 + .LabelVideoClassificationOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 5; + break; + } + case 50: + { + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .Builder + subBuilder = null; + if (detailsCase_ == 6) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectDetectionOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectDetectionOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectDetectionOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 6; + break; + } + case 58: + { + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .Builder + subBuilder = null; + if (detailsCase_ == 7) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectTrackingOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectTrackingOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectTrackingOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 7; + break; + } + case 66: + { + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.Builder + subBuilder = null; + if (detailsCase_ == 8) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 8; + break; + } + case 74: + { + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata.Builder + subBuilder = null; + if (detailsCase_ == 9) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1 + .LabelTextClassificationOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 9; + break; + } + case 82: + { + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata.Builder + subBuilder = null; + if (detailsCase_ == 10) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1 + .LabelAudioTranscriptionOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 10; + break; + } + case 90: + { + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata.Builder + subBuilder = null; + if (detailsCase_ == 11) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 11; + break; + } + case 98: + { + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.Builder + subBuilder = null; + if (detailsCase_ == 12) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 12; + break; + } + case 106: + { + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .Builder + subBuilder = null; + if (detailsCase_ == 13) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1 + .LabelTextEntityExtractionOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1 + .LabelTextEntityExtractionOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1 + .LabelTextEntityExtractionOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 13; + break; + } + case 114: + { + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .Builder + subBuilder = null; + if (detailsCase_ == 14) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadata.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 14; + break; + } + case 122: + { + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata.Builder + subBuilder = null; + if (detailsCase_ == 15) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + details_) + .toBuilder(); + } + details_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + details_); + details_ = subBuilder.buildPartial(); + } + detailsCase_ = 15; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata.Builder.class); + } + + private int bitField0_; + private int detailsCase_ = 0; + private java.lang.Object details_; + + public enum DetailsCase implements com.google.protobuf.Internal.EnumLite { + IMAGE_CLASSIFICATION_DETAILS(3), + IMAGE_BOUNDING_BOX_DETAILS(4), + IMAGE_BOUNDING_POLY_DETAILS(11), + IMAGE_ORIENTED_BOUNDING_BOX_DETAILS(14), + IMAGE_POLYLINE_DETAILS(12), + IMAGE_SEGMENTATION_DETAILS(15), + VIDEO_CLASSIFICATION_DETAILS(5), + VIDEO_OBJECT_DETECTION_DETAILS(6), + VIDEO_OBJECT_TRACKING_DETAILS(7), + VIDEO_EVENT_DETAILS(8), + TEXT_CLASSIFICATION_DETAILS(9), + AUDIO_TRANSCRIPTION_DETAILS(10), + TEXT_ENTITY_EXTRACTION_DETAILS(13), + DETAILS_NOT_SET(0); + private final int value; + + private DetailsCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static DetailsCase valueOf(int value) { + return forNumber(value); + } + + public static DetailsCase forNumber(int value) { + switch (value) { + case 3: + return IMAGE_CLASSIFICATION_DETAILS; + case 4: + return IMAGE_BOUNDING_BOX_DETAILS; + case 11: + return IMAGE_BOUNDING_POLY_DETAILS; + case 14: + return IMAGE_ORIENTED_BOUNDING_BOX_DETAILS; + case 12: + return IMAGE_POLYLINE_DETAILS; + case 15: + return IMAGE_SEGMENTATION_DETAILS; + case 5: + return VIDEO_CLASSIFICATION_DETAILS; + case 6: + return VIDEO_OBJECT_DETECTION_DETAILS; + case 7: + return VIDEO_OBJECT_TRACKING_DETAILS; + case 8: + return VIDEO_EVENT_DETAILS; + case 9: + return TEXT_CLASSIFICATION_DETAILS; + case 10: + return AUDIO_TRANSCRIPTION_DETAILS; + case 13: + return TEXT_ENTITY_EXTRACTION_DETAILS; + case 0: + return DETAILS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public static final int PROGRESS_PERCENT_FIELD_NUMBER = 1; + private int progressPercent_; + /** + * + * + *
+   * Output only. Progress of label operation. Range: [0, 100].
+   * Currently not supported.
+   * 
+ * + * int32 progress_percent = 1; + */ + public int getProgressPercent() { + return progressPercent_; + } + + public static final int PARTIAL_FAILURES_FIELD_NUMBER = 2; + private java.util.List partialFailures_; + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List + getPartialFailuresOrBuilderList() { + return partialFailures_; + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public int getPartialFailuresCount() { + return partialFailures_.size(); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status getPartialFailures(int index) { + return partialFailures_.get(index); + } + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + return partialFailures_.get(index); + } + + public static final int IMAGE_CLASSIFICATION_DETAILS_FIELD_NUMBER = 3; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + public boolean hasImageClassificationDetails() { + return detailsCase_ == 3; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + getImageClassificationDetails() { + if (detailsCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadataOrBuilder + getImageClassificationDetailsOrBuilder() { + if (detailsCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .getDefaultInstance(); + } + + public static final int IMAGE_BOUNDING_BOX_DETAILS_FIELD_NUMBER = 4; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + public boolean hasImageBoundingBoxDetails() { + return detailsCase_ == 4; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + getImageBoundingBoxDetails() { + if (detailsCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadataOrBuilder + getImageBoundingBoxDetailsOrBuilder() { + if (detailsCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .getDefaultInstance(); + } + + public static final int IMAGE_BOUNDING_POLY_DETAILS_FIELD_NUMBER = 11; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + public boolean hasImageBoundingPolyDetails() { + return detailsCase_ == 11; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + getImageBoundingPolyDetails() { + if (detailsCase_ == 11) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadataOrBuilder + getImageBoundingPolyDetailsOrBuilder() { + if (detailsCase_ == 11) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .getDefaultInstance(); + } + + public static final int IMAGE_ORIENTED_BOUNDING_BOX_DETAILS_FIELD_NUMBER = 14; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + public boolean hasImageOrientedBoundingBoxDetails() { + return detailsCase_ == 14; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + getImageOrientedBoundingBoxDetails() { + if (detailsCase_ == 14) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + public com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadataOrBuilder + getImageOrientedBoundingBoxDetailsOrBuilder() { + if (detailsCase_ == 14) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .getDefaultInstance(); + } + + public static final int IMAGE_POLYLINE_DETAILS_FIELD_NUMBER = 12; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + public boolean hasImagePolylineDetails() { + return detailsCase_ == 12; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + getImagePolylineDetails() { + if (detailsCase_ == 12) { + return (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadataOrBuilder + getImagePolylineDetailsOrBuilder() { + if (detailsCase_ == 12) { + return (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + .getDefaultInstance(); + } + + public static final int IMAGE_SEGMENTATION_DETAILS_FIELD_NUMBER = 15; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + public boolean hasImageSegmentationDetails() { + return detailsCase_ == 15; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + getImageSegmentationDetails() { + if (detailsCase_ == 15) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadataOrBuilder + getImageSegmentationDetailsOrBuilder() { + if (detailsCase_ == 15) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .getDefaultInstance(); + } + + public static final int VIDEO_CLASSIFICATION_DETAILS_FIELD_NUMBER = 5; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + public boolean hasVideoClassificationDetails() { + return detailsCase_ == 5; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + getVideoClassificationDetails() { + if (detailsCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadataOrBuilder + getVideoClassificationDetailsOrBuilder() { + if (detailsCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .getDefaultInstance(); + } + + public static final int VIDEO_OBJECT_DETECTION_DETAILS_FIELD_NUMBER = 6; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + public boolean hasVideoObjectDetectionDetails() { + return detailsCase_ == 6; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + getVideoObjectDetectionDetails() { + if (detailsCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadataOrBuilder + getVideoObjectDetectionDetailsOrBuilder() { + if (detailsCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .getDefaultInstance(); + } + + public static final int VIDEO_OBJECT_TRACKING_DETAILS_FIELD_NUMBER = 7; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + public boolean hasVideoObjectTrackingDetails() { + return detailsCase_ == 7; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + getVideoObjectTrackingDetails() { + if (detailsCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadataOrBuilder + getVideoObjectTrackingDetailsOrBuilder() { + if (detailsCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .getDefaultInstance(); + } + + public static final int VIDEO_EVENT_DETAILS_FIELD_NUMBER = 8; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + public boolean hasVideoEventDetails() { + return detailsCase_ == 8; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + getVideoEventDetails() { + if (detailsCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadataOrBuilder + getVideoEventDetailsOrBuilder() { + if (detailsCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + .getDefaultInstance(); + } + + public static final int TEXT_CLASSIFICATION_DETAILS_FIELD_NUMBER = 9; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + public boolean hasTextClassificationDetails() { + return detailsCase_ == 9; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + getTextClassificationDetails() { + if (detailsCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadataOrBuilder + getTextClassificationDetailsOrBuilder() { + if (detailsCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .getDefaultInstance(); + } + + public static final int AUDIO_TRANSCRIPTION_DETAILS_FIELD_NUMBER = 10; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + public boolean hasAudioTranscriptionDetails() { + return detailsCase_ == 10; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + getAudioTranscriptionDetails() { + if (detailsCase_ == 10) { + return (com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadataOrBuilder + getAudioTranscriptionDetailsOrBuilder() { + if (detailsCase_ == 10) { + return (com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .getDefaultInstance(); + } + + public static final int TEXT_ENTITY_EXTRACTION_DETAILS_FIELD_NUMBER = 13; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + public boolean hasTextEntityExtractionDetails() { + return detailsCase_ == 13; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + getTextEntityExtractionDetails() { + if (detailsCase_ == 13) { + return (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .getDefaultInstance(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadataOrBuilder + getTextEntityExtractionDetailsOrBuilder() { + if (detailsCase_ == 13) { + return (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (progressPercent_ != 0) { + output.writeInt32(1, progressPercent_); + } + for (int i = 0; i < partialFailures_.size(); i++) { + output.writeMessage(2, partialFailures_.get(i)); + } + if (detailsCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + details_); + } + if (detailsCase_ == 4) { + output.writeMessage( + 4, + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) details_); + } + if (detailsCase_ == 5) { + output.writeMessage( + 5, + (com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + details_); + } + if (detailsCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + details_); + } + if (detailsCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + details_); + } + if (detailsCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) details_); + } + if (detailsCase_ == 9) { + output.writeMessage( + 9, + (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + details_); + } + if (detailsCase_ == 10) { + output.writeMessage( + 10, + (com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + details_); + } + if (detailsCase_ == 11) { + output.writeMessage( + 11, + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) details_); + } + if (detailsCase_ == 12) { + output.writeMessage( + 12, (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) details_); + } + if (detailsCase_ == 13) { + output.writeMessage( + 13, + (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + details_); + } + if (detailsCase_ == 14) { + output.writeMessage( + 14, + (com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) + details_); + } + if (detailsCase_ == 15) { + output.writeMessage( + 15, + (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) details_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (progressPercent_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, progressPercent_); + } + for (int i = 0; i < partialFailures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, partialFailures_.get(i)); + } + if (detailsCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + details_); + } + if (detailsCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + details_); + } + if (detailsCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + details_); + } + if (detailsCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + details_); + } + if (detailsCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + details_); + } + if (detailsCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) details_); + } + if (detailsCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, + (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + details_); + } + if (detailsCase_ == 10) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, + (com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + details_); + } + if (detailsCase_ == 11) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 11, + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + details_); + } + if (detailsCase_ == 12) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, + (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) details_); + } + if (detailsCase_ == 13) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 13, + (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + details_); + } + if (detailsCase_ == 14) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 14, + (com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata) + details_); + } + if (detailsCase_ == 15) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 15, + (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + details_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata) obj; + + if (getProgressPercent() != other.getProgressPercent()) return false; + if (!getPartialFailuresList().equals(other.getPartialFailuresList())) return false; + if (!getDetailsCase().equals(other.getDetailsCase())) return false; + switch (detailsCase_) { + case 3: + if (!getImageClassificationDetails().equals(other.getImageClassificationDetails())) + return false; + break; + case 4: + if (!getImageBoundingBoxDetails().equals(other.getImageBoundingBoxDetails())) return false; + break; + case 11: + if (!getImageBoundingPolyDetails().equals(other.getImageBoundingPolyDetails())) + return false; + break; + case 14: + if (!getImageOrientedBoundingBoxDetails() + .equals(other.getImageOrientedBoundingBoxDetails())) return false; + break; + case 12: + if (!getImagePolylineDetails().equals(other.getImagePolylineDetails())) return false; + break; + case 15: + if (!getImageSegmentationDetails().equals(other.getImageSegmentationDetails())) + return false; + break; + case 5: + if (!getVideoClassificationDetails().equals(other.getVideoClassificationDetails())) + return false; + break; + case 6: + if (!getVideoObjectDetectionDetails().equals(other.getVideoObjectDetectionDetails())) + return false; + break; + case 7: + if (!getVideoObjectTrackingDetails().equals(other.getVideoObjectTrackingDetails())) + return false; + break; + case 8: + if (!getVideoEventDetails().equals(other.getVideoEventDetails())) return false; + break; + case 9: + if (!getTextClassificationDetails().equals(other.getTextClassificationDetails())) + return false; + break; + case 10: + if (!getAudioTranscriptionDetails().equals(other.getAudioTranscriptionDetails())) + return false; + break; + case 13: + if (!getTextEntityExtractionDetails().equals(other.getTextEntityExtractionDetails())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROGRESS_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + getProgressPercent(); + if (getPartialFailuresCount() > 0) { + hash = (37 * hash) + PARTIAL_FAILURES_FIELD_NUMBER; + hash = (53 * hash) + getPartialFailuresList().hashCode(); + } + switch (detailsCase_) { + case 3: + hash = (37 * hash) + IMAGE_CLASSIFICATION_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getImageClassificationDetails().hashCode(); + break; + case 4: + hash = (37 * hash) + IMAGE_BOUNDING_BOX_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getImageBoundingBoxDetails().hashCode(); + break; + case 11: + hash = (37 * hash) + IMAGE_BOUNDING_POLY_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getImageBoundingPolyDetails().hashCode(); + break; + case 14: + hash = (37 * hash) + IMAGE_ORIENTED_BOUNDING_BOX_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getImageOrientedBoundingBoxDetails().hashCode(); + break; + case 12: + hash = (37 * hash) + IMAGE_POLYLINE_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getImagePolylineDetails().hashCode(); + break; + case 15: + hash = (37 * hash) + IMAGE_SEGMENTATION_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getImageSegmentationDetails().hashCode(); + break; + case 5: + hash = (37 * hash) + VIDEO_CLASSIFICATION_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getVideoClassificationDetails().hashCode(); + break; + case 6: + hash = (37 * hash) + VIDEO_OBJECT_DETECTION_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getVideoObjectDetectionDetails().hashCode(); + break; + case 7: + hash = (37 * hash) + VIDEO_OBJECT_TRACKING_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getVideoObjectTrackingDetails().hashCode(); + break; + case 8: + hash = (37 * hash) + VIDEO_EVENT_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getVideoEventDetails().hashCode(); + break; + case 9: + hash = (37 * hash) + TEXT_CLASSIFICATION_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getTextClassificationDetails().hashCode(); + break; + case 10: + hash = (37 * hash) + AUDIO_TRANSCRIPTION_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getAudioTranscriptionDetails().hashCode(); + break; + case 13: + hash = (37 * hash) + TEXT_ENTITY_EXTRACTION_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getTextEntityExtractionDetails().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata of a labeling operation, such as LabelImage or LabelVideo.
+   * Next tag: 16
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPartialFailuresFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + progressPercent_ = 0; + + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + partialFailuresBuilder_.clear(); + } + detailsCase_ = 0; + details_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.progressPercent_ = progressPercent_; + if (partialFailuresBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + partialFailures_ = java.util.Collections.unmodifiableList(partialFailures_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.partialFailures_ = partialFailures_; + } else { + result.partialFailures_ = partialFailuresBuilder_.build(); + } + if (detailsCase_ == 3) { + if (imageClassificationDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = imageClassificationDetailsBuilder_.build(); + } + } + if (detailsCase_ == 4) { + if (imageBoundingBoxDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = imageBoundingBoxDetailsBuilder_.build(); + } + } + if (detailsCase_ == 11) { + if (imageBoundingPolyDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = imageBoundingPolyDetailsBuilder_.build(); + } + } + if (detailsCase_ == 14) { + if (imageOrientedBoundingBoxDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = imageOrientedBoundingBoxDetailsBuilder_.build(); + } + } + if (detailsCase_ == 12) { + if (imagePolylineDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = imagePolylineDetailsBuilder_.build(); + } + } + if (detailsCase_ == 15) { + if (imageSegmentationDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = imageSegmentationDetailsBuilder_.build(); + } + } + if (detailsCase_ == 5) { + if (videoClassificationDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = videoClassificationDetailsBuilder_.build(); + } + } + if (detailsCase_ == 6) { + if (videoObjectDetectionDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = videoObjectDetectionDetailsBuilder_.build(); + } + } + if (detailsCase_ == 7) { + if (videoObjectTrackingDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = videoObjectTrackingDetailsBuilder_.build(); + } + } + if (detailsCase_ == 8) { + if (videoEventDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = videoEventDetailsBuilder_.build(); + } + } + if (detailsCase_ == 9) { + if (textClassificationDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = textClassificationDetailsBuilder_.build(); + } + } + if (detailsCase_ == 10) { + if (audioTranscriptionDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = audioTranscriptionDetailsBuilder_.build(); + } + } + if (detailsCase_ == 13) { + if (textEntityExtractionDetailsBuilder_ == null) { + result.details_ = details_; + } else { + result.details_ = textEntityExtractionDetailsBuilder_.build(); + } + } + result.bitField0_ = to_bitField0_; + result.detailsCase_ = detailsCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata.getDefaultInstance()) + return this; + if (other.getProgressPercent() != 0) { + setProgressPercent(other.getProgressPercent()); + } + if (partialFailuresBuilder_ == null) { + if (!other.partialFailures_.isEmpty()) { + if (partialFailures_.isEmpty()) { + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePartialFailuresIsMutable(); + partialFailures_.addAll(other.partialFailures_); + } + onChanged(); + } + } else { + if (!other.partialFailures_.isEmpty()) { + if (partialFailuresBuilder_.isEmpty()) { + partialFailuresBuilder_.dispose(); + partialFailuresBuilder_ = null; + partialFailures_ = other.partialFailures_; + bitField0_ = (bitField0_ & ~0x00000002); + partialFailuresBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPartialFailuresFieldBuilder() + : null; + } else { + partialFailuresBuilder_.addAllMessages(other.partialFailures_); + } + } + } + switch (other.getDetailsCase()) { + case IMAGE_CLASSIFICATION_DETAILS: + { + mergeImageClassificationDetails(other.getImageClassificationDetails()); + break; + } + case IMAGE_BOUNDING_BOX_DETAILS: + { + mergeImageBoundingBoxDetails(other.getImageBoundingBoxDetails()); + break; + } + case IMAGE_BOUNDING_POLY_DETAILS: + { + mergeImageBoundingPolyDetails(other.getImageBoundingPolyDetails()); + break; + } + case IMAGE_ORIENTED_BOUNDING_BOX_DETAILS: + { + mergeImageOrientedBoundingBoxDetails(other.getImageOrientedBoundingBoxDetails()); + break; + } + case IMAGE_POLYLINE_DETAILS: + { + mergeImagePolylineDetails(other.getImagePolylineDetails()); + break; + } + case IMAGE_SEGMENTATION_DETAILS: + { + mergeImageSegmentationDetails(other.getImageSegmentationDetails()); + break; + } + case VIDEO_CLASSIFICATION_DETAILS: + { + mergeVideoClassificationDetails(other.getVideoClassificationDetails()); + break; + } + case VIDEO_OBJECT_DETECTION_DETAILS: + { + mergeVideoObjectDetectionDetails(other.getVideoObjectDetectionDetails()); + break; + } + case VIDEO_OBJECT_TRACKING_DETAILS: + { + mergeVideoObjectTrackingDetails(other.getVideoObjectTrackingDetails()); + break; + } + case VIDEO_EVENT_DETAILS: + { + mergeVideoEventDetails(other.getVideoEventDetails()); + break; + } + case TEXT_CLASSIFICATION_DETAILS: + { + mergeTextClassificationDetails(other.getTextClassificationDetails()); + break; + } + case AUDIO_TRANSCRIPTION_DETAILS: + { + mergeAudioTranscriptionDetails(other.getAudioTranscriptionDetails()); + break; + } + case TEXT_ENTITY_EXTRACTION_DETAILS: + { + mergeTextEntityExtractionDetails(other.getTextEntityExtractionDetails()); + break; + } + case DETAILS_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int detailsCase_ = 0; + private java.lang.Object details_; + + public DetailsCase getDetailsCase() { + return DetailsCase.forNumber(detailsCase_); + } + + public Builder clearDetails() { + detailsCase_ = 0; + details_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private int progressPercent_; + /** + * + * + *
+     * Output only. Progress of label operation. Range: [0, 100].
+     * Currently not supported.
+     * 
+ * + * int32 progress_percent = 1; + */ + public int getProgressPercent() { + return progressPercent_; + } + /** + * + * + *
+     * Output only. Progress of label operation. Range: [0, 100].
+     * Currently not supported.
+     * 
+ * + * int32 progress_percent = 1; + */ + public Builder setProgressPercent(int value) { + + progressPercent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Progress of label operation. Range: [0, 100].
+     * Currently not supported.
+     * 
+ * + * int32 progress_percent = 1; + */ + public Builder clearProgressPercent() { + + progressPercent_ = 0; + onChanged(); + return this; + } + + private java.util.List partialFailures_ = + java.util.Collections.emptyList(); + + private void ensurePartialFailuresIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + partialFailures_ = new java.util.ArrayList(partialFailures_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + partialFailuresBuilder_; + + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresList() { + if (partialFailuresBuilder_ == null) { + return java.util.Collections.unmodifiableList(partialFailures_); + } else { + return partialFailuresBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public int getPartialFailuresCount() { + if (partialFailuresBuilder_ == null) { + return partialFailures_.size(); + } else { + return partialFailuresBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status getPartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder setPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, value); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder setPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.set(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(int index, com.google.rpc.Status value) { + if (partialFailuresBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, value); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.add(index, builderForValue.build()); + onChanged(); + } else { + partialFailuresBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder addAllPartialFailures( + java.lang.Iterable values) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialFailures_); + onChanged(); + } else { + partialFailuresBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder clearPartialFailures() { + if (partialFailuresBuilder_ == null) { + partialFailures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + partialFailuresBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public Builder removePartialFailures(int index) { + if (partialFailuresBuilder_ == null) { + ensurePartialFailuresIsMutable(); + partialFailures_.remove(index); + onChanged(); + } else { + partialFailuresBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder getPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { + if (partialFailuresBuilder_ == null) { + return partialFailures_.get(index); + } else { + return partialFailuresBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List + getPartialFailuresOrBuilderList() { + if (partialFailuresBuilder_ != null) { + return partialFailuresBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(partialFailures_); + } + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder() { + return getPartialFailuresFieldBuilder() + .addBuilder(com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public com.google.rpc.Status.Builder addPartialFailuresBuilder(int index) { + return getPartialFailuresFieldBuilder() + .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. Partial failures encountered.
+     * E.g. single files that couldn't be read.
+     * Status details field will contain standard GCP error details.
+     * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + public java.util.List getPartialFailuresBuilderList() { + return getPartialFailuresFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getPartialFailuresFieldBuilder() { + if (partialFailuresBuilder_ == null) { + partialFailuresBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>( + partialFailures_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + partialFailures_ = null; + } + return partialFailuresBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelImageClassificationOperationMetadataOrBuilder> + imageClassificationDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + public boolean hasImageClassificationDetails() { + return detailsCase_ == 3; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + getImageClassificationDetails() { + if (imageClassificationDetailsBuilder_ == null) { + if (detailsCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 3) { + return imageClassificationDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + public Builder setImageClassificationDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata value) { + if (imageClassificationDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + imageClassificationDetailsBuilder_.setMessage(value); + } + detailsCase_ = 3; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + public Builder setImageClassificationDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata.Builder + builderForValue) { + if (imageClassificationDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + imageClassificationDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 3; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + public Builder mergeImageClassificationDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata value) { + if (imageClassificationDetailsBuilder_ == null) { + if (detailsCase_ == 3 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .newBuilder( + (com.google.cloud.datalabeling.v1beta1 + .LabelImageClassificationOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 3) { + imageClassificationDetailsBuilder_.mergeFrom(value); + } + imageClassificationDetailsBuilder_.setMessage(value); + } + detailsCase_ = 3; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + public Builder clearImageClassificationDetails() { + if (imageClassificationDetailsBuilder_ == null) { + if (detailsCase_ == 3) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 3) { + detailsCase_ = 0; + details_ = null; + } + imageClassificationDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata.Builder + getImageClassificationDetailsBuilder() { + return getImageClassificationDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadataOrBuilder + getImageClassificationDetailsOrBuilder() { + if ((detailsCase_ == 3) && (imageClassificationDetailsBuilder_ != null)) { + return imageClassificationDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 3) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelImageClassificationOperationMetadataOrBuilder> + getImageClassificationDetailsFieldBuilder() { + if (imageClassificationDetailsBuilder_ == null) { + if (!(detailsCase_ == 3)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .getDefaultInstance(); + } + imageClassificationDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelImageClassificationOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 3; + onChanged(); + ; + return imageClassificationDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadataOrBuilder> + imageBoundingBoxDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + public boolean hasImageBoundingBoxDetails() { + return detailsCase_ == 4; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + getImageBoundingBoxDetails() { + if (imageBoundingBoxDetailsBuilder_ == null) { + if (detailsCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 4) { + return imageBoundingBoxDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + public Builder setImageBoundingBoxDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata value) { + if (imageBoundingBoxDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + imageBoundingBoxDetailsBuilder_.setMessage(value); + } + detailsCase_ = 4; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + public Builder setImageBoundingBoxDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata.Builder + builderForValue) { + if (imageBoundingBoxDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + imageBoundingBoxDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 4; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + public Builder mergeImageBoundingBoxDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata value) { + if (imageBoundingBoxDetailsBuilder_ == null) { + if (detailsCase_ == 4 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .newBuilder( + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 4) { + imageBoundingBoxDetailsBuilder_.mergeFrom(value); + } + imageBoundingBoxDetailsBuilder_.setMessage(value); + } + detailsCase_ = 4; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + public Builder clearImageBoundingBoxDetails() { + if (imageBoundingBoxDetailsBuilder_ == null) { + if (detailsCase_ == 4) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 4) { + detailsCase_ = 0; + details_ = null; + } + imageBoundingBoxDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata.Builder + getImageBoundingBoxDetailsBuilder() { + return getImageBoundingBoxDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadataOrBuilder + getImageBoundingBoxDetailsOrBuilder() { + if ((detailsCase_ == 4) && (imageBoundingBoxDetailsBuilder_ != null)) { + return imageBoundingBoxDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadataOrBuilder> + getImageBoundingBoxDetailsFieldBuilder() { + if (imageBoundingBoxDetailsBuilder_ == null) { + if (!(detailsCase_ == 4)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .getDefaultInstance(); + } + imageBoundingBoxDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelImageBoundingBoxOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 4; + onChanged(); + ; + return imageBoundingBoxDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadataOrBuilder> + imageBoundingPolyDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + public boolean hasImageBoundingPolyDetails() { + return detailsCase_ == 11; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + getImageBoundingPolyDetails() { + if (imageBoundingPolyDetailsBuilder_ == null) { + if (detailsCase_ == 11) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 11) { + return imageBoundingPolyDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + public Builder setImageBoundingPolyDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata value) { + if (imageBoundingPolyDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + imageBoundingPolyDetailsBuilder_.setMessage(value); + } + detailsCase_ = 11; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + public Builder setImageBoundingPolyDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata.Builder + builderForValue) { + if (imageBoundingPolyDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + imageBoundingPolyDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 11; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + public Builder mergeImageBoundingPolyDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata value) { + if (imageBoundingPolyDetailsBuilder_ == null) { + if (detailsCase_ == 11 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .newBuilder( + (com.google.cloud.datalabeling.v1beta1 + .LabelImageBoundingPolyOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 11) { + imageBoundingPolyDetailsBuilder_.mergeFrom(value); + } + imageBoundingPolyDetailsBuilder_.setMessage(value); + } + detailsCase_ = 11; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + public Builder clearImageBoundingPolyDetails() { + if (imageBoundingPolyDetailsBuilder_ == null) { + if (detailsCase_ == 11) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 11) { + detailsCase_ = 0; + details_ = null; + } + imageBoundingPolyDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata.Builder + getImageBoundingPolyDetailsBuilder() { + return getImageBoundingPolyDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadataOrBuilder + getImageBoundingPolyDetailsOrBuilder() { + if ((detailsCase_ == 11) && (imageBoundingPolyDetailsBuilder_ != null)) { + return imageBoundingPolyDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 11) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadataOrBuilder> + getImageBoundingPolyDetailsFieldBuilder() { + if (imageBoundingPolyDetailsBuilder_ == null) { + if (!(detailsCase_ == 11)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .getDefaultInstance(); + } + imageBoundingPolyDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelImageBoundingPolyOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 11; + onChanged(); + ; + return imageBoundingPolyDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadataOrBuilder> + imageOrientedBoundingBoxDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + public boolean hasImageOrientedBoundingBoxDetails() { + return detailsCase_ == 14; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + getImageOrientedBoundingBoxDetails() { + if (imageOrientedBoundingBoxDetailsBuilder_ == null) { + if (detailsCase_ == 14) { + return (com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 14) { + return imageOrientedBoundingBoxDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + public Builder setImageOrientedBoundingBoxDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + value) { + if (imageOrientedBoundingBoxDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + imageOrientedBoundingBoxDetailsBuilder_.setMessage(value); + } + detailsCase_ = 14; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + public Builder setImageOrientedBoundingBoxDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata.Builder + builderForValue) { + if (imageOrientedBoundingBoxDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + imageOrientedBoundingBoxDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 14; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + public Builder mergeImageOrientedBoundingBoxDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + value) { + if (imageOrientedBoundingBoxDetailsBuilder_ == null) { + if (detailsCase_ == 14 + && details_ + != com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadata.getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .newBuilder( + (com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 14) { + imageOrientedBoundingBoxDetailsBuilder_.mergeFrom(value); + } + imageOrientedBoundingBoxDetailsBuilder_.setMessage(value); + } + detailsCase_ = 14; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + public Builder clearImageOrientedBoundingBoxDetails() { + if (imageOrientedBoundingBoxDetailsBuilder_ == null) { + if (detailsCase_ == 14) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 14) { + detailsCase_ = 0; + details_ = null; + } + imageOrientedBoundingBoxDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .Builder + getImageOrientedBoundingBoxDetailsBuilder() { + return getImageOrientedBoundingBoxDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + public com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadataOrBuilder + getImageOrientedBoundingBoxDetailsOrBuilder() { + if ((detailsCase_ == 14) && (imageOrientedBoundingBoxDetailsBuilder_ != null)) { + return imageOrientedBoundingBoxDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 14) { + return (com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadataOrBuilder> + getImageOrientedBoundingBoxDetailsFieldBuilder() { + if (imageOrientedBoundingBoxDetailsBuilder_ == null) { + if (!(detailsCase_ == 14)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .getDefaultInstance(); + } + imageOrientedBoundingBoxDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1 + .LabelImageOrientedBoundingBoxOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 14; + onChanged(); + ; + return imageOrientedBoundingBoxDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadataOrBuilder> + imagePolylineDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + public boolean hasImagePolylineDetails() { + return detailsCase_ == 12; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + getImagePolylineDetails() { + if (imagePolylineDetailsBuilder_ == null) { + if (detailsCase_ == 12) { + return (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 12) { + return imagePolylineDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + public Builder setImagePolylineDetails( + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata value) { + if (imagePolylineDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + imagePolylineDetailsBuilder_.setMessage(value); + } + detailsCase_ = 12; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + public Builder setImagePolylineDetails( + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.Builder + builderForValue) { + if (imagePolylineDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + imagePolylineDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 12; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + public Builder mergeImagePolylineDetails( + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata value) { + if (imagePolylineDetailsBuilder_ == null) { + if (detailsCase_ == 12 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.newBuilder( + (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 12) { + imagePolylineDetailsBuilder_.mergeFrom(value); + } + imagePolylineDetailsBuilder_.setMessage(value); + } + detailsCase_ = 12; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + public Builder clearImagePolylineDetails() { + if (imagePolylineDetailsBuilder_ == null) { + if (detailsCase_ == 12) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 12) { + detailsCase_ = 0; + details_ = null; + } + imagePolylineDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.Builder + getImagePolylineDetailsBuilder() { + return getImagePolylineDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadataOrBuilder + getImagePolylineDetailsOrBuilder() { + if ((detailsCase_ == 12) && (imagePolylineDetailsBuilder_ != null)) { + return imagePolylineDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 12) { + return (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadataOrBuilder> + getImagePolylineDetailsFieldBuilder() { + if (imagePolylineDetailsBuilder_ == null) { + if (!(detailsCase_ == 12)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + .getDefaultInstance(); + } + imagePolylineDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 12; + onChanged(); + ; + return imagePolylineDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadataOrBuilder> + imageSegmentationDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + public boolean hasImageSegmentationDetails() { + return detailsCase_ == 15; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + getImageSegmentationDetails() { + if (imageSegmentationDetailsBuilder_ == null) { + if (detailsCase_ == 15) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 15) { + return imageSegmentationDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + public Builder setImageSegmentationDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata value) { + if (imageSegmentationDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + imageSegmentationDetailsBuilder_.setMessage(value); + } + detailsCase_ = 15; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + public Builder setImageSegmentationDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata.Builder + builderForValue) { + if (imageSegmentationDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + imageSegmentationDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 15; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + public Builder mergeImageSegmentationDetails( + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata value) { + if (imageSegmentationDetailsBuilder_ == null) { + if (detailsCase_ == 15 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .newBuilder( + (com.google.cloud.datalabeling.v1beta1 + .LabelImageSegmentationOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 15) { + imageSegmentationDetailsBuilder_.mergeFrom(value); + } + imageSegmentationDetailsBuilder_.setMessage(value); + } + detailsCase_ = 15; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + public Builder clearImageSegmentationDetails() { + if (imageSegmentationDetailsBuilder_ == null) { + if (detailsCase_ == 15) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 15) { + detailsCase_ = 0; + details_ = null; + } + imageSegmentationDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata.Builder + getImageSegmentationDetailsBuilder() { + return getImageSegmentationDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadataOrBuilder + getImageSegmentationDetailsOrBuilder() { + if ((detailsCase_ == 15) && (imageSegmentationDetailsBuilder_ != null)) { + return imageSegmentationDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 15) { + return (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadataOrBuilder> + getImageSegmentationDetailsFieldBuilder() { + if (imageSegmentationDetailsBuilder_ == null) { + if (!(detailsCase_ == 15)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .getDefaultInstance(); + } + imageSegmentationDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelImageSegmentationOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 15; + onChanged(); + ; + return imageSegmentationDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelVideoClassificationOperationMetadataOrBuilder> + videoClassificationDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + public boolean hasVideoClassificationDetails() { + return detailsCase_ == 5; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + getVideoClassificationDetails() { + if (videoClassificationDetailsBuilder_ == null) { + if (detailsCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 5) { + return videoClassificationDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + public Builder setVideoClassificationDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata value) { + if (videoClassificationDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + videoClassificationDetailsBuilder_.setMessage(value); + } + detailsCase_ = 5; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + public Builder setVideoClassificationDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata.Builder + builderForValue) { + if (videoClassificationDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + videoClassificationDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 5; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + public Builder mergeVideoClassificationDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata value) { + if (videoClassificationDetailsBuilder_ == null) { + if (detailsCase_ == 5 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .newBuilder( + (com.google.cloud.datalabeling.v1beta1 + .LabelVideoClassificationOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 5) { + videoClassificationDetailsBuilder_.mergeFrom(value); + } + videoClassificationDetailsBuilder_.setMessage(value); + } + detailsCase_ = 5; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + public Builder clearVideoClassificationDetails() { + if (videoClassificationDetailsBuilder_ == null) { + if (detailsCase_ == 5) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 5) { + detailsCase_ = 0; + details_ = null; + } + videoClassificationDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata.Builder + getVideoClassificationDetailsBuilder() { + return getVideoClassificationDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadataOrBuilder + getVideoClassificationDetailsOrBuilder() { + if ((detailsCase_ == 5) && (videoClassificationDetailsBuilder_ != null)) { + return videoClassificationDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelVideoClassificationOperationMetadataOrBuilder> + getVideoClassificationDetailsFieldBuilder() { + if (videoClassificationDetailsBuilder_ == null) { + if (!(detailsCase_ == 5)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .getDefaultInstance(); + } + videoClassificationDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelVideoClassificationOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 5; + onChanged(); + ; + return videoClassificationDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectDetectionOperationMetadataOrBuilder> + videoObjectDetectionDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + public boolean hasVideoObjectDetectionDetails() { + return detailsCase_ == 6; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + getVideoObjectDetectionDetails() { + if (videoObjectDetectionDetailsBuilder_ == null) { + if (detailsCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 6) { + return videoObjectDetectionDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + public Builder setVideoObjectDetectionDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata value) { + if (videoObjectDetectionDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + videoObjectDetectionDetailsBuilder_.setMessage(value); + } + detailsCase_ = 6; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + public Builder setVideoObjectDetectionDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata.Builder + builderForValue) { + if (videoObjectDetectionDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + videoObjectDetectionDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 6; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + public Builder mergeVideoObjectDetectionDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata value) { + if (videoObjectDetectionDetailsBuilder_ == null) { + if (detailsCase_ == 6 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .newBuilder( + (com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectDetectionOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 6) { + videoObjectDetectionDetailsBuilder_.mergeFrom(value); + } + videoObjectDetectionDetailsBuilder_.setMessage(value); + } + detailsCase_ = 6; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + public Builder clearVideoObjectDetectionDetails() { + if (videoObjectDetectionDetailsBuilder_ == null) { + if (detailsCase_ == 6) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 6) { + detailsCase_ = 0; + details_ = null; + } + videoObjectDetectionDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata.Builder + getVideoObjectDetectionDetailsBuilder() { + return getVideoObjectDetectionDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadataOrBuilder + getVideoObjectDetectionDetailsOrBuilder() { + if ((detailsCase_ == 6) && (videoObjectDetectionDetailsBuilder_ != null)) { + return videoObjectDetectionDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectDetectionOperationMetadataOrBuilder> + getVideoObjectDetectionDetailsFieldBuilder() { + if (videoObjectDetectionDetailsBuilder_ == null) { + if (!(detailsCase_ == 6)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .getDefaultInstance(); + } + videoObjectDetectionDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectDetectionOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 6; + onChanged(); + ; + return videoObjectDetectionDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectTrackingOperationMetadataOrBuilder> + videoObjectTrackingDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + public boolean hasVideoObjectTrackingDetails() { + return detailsCase_ == 7; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + getVideoObjectTrackingDetails() { + if (videoObjectTrackingDetailsBuilder_ == null) { + if (detailsCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 7) { + return videoObjectTrackingDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + public Builder setVideoObjectTrackingDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata value) { + if (videoObjectTrackingDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + videoObjectTrackingDetailsBuilder_.setMessage(value); + } + detailsCase_ = 7; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + public Builder setVideoObjectTrackingDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata.Builder + builderForValue) { + if (videoObjectTrackingDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + videoObjectTrackingDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 7; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + public Builder mergeVideoObjectTrackingDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata value) { + if (videoObjectTrackingDetailsBuilder_ == null) { + if (detailsCase_ == 7 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .newBuilder( + (com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectTrackingOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 7) { + videoObjectTrackingDetailsBuilder_.mergeFrom(value); + } + videoObjectTrackingDetailsBuilder_.setMessage(value); + } + detailsCase_ = 7; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + public Builder clearVideoObjectTrackingDetails() { + if (videoObjectTrackingDetailsBuilder_ == null) { + if (detailsCase_ == 7) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 7) { + detailsCase_ = 0; + details_ = null; + } + videoObjectTrackingDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata.Builder + getVideoObjectTrackingDetailsBuilder() { + return getVideoObjectTrackingDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadataOrBuilder + getVideoObjectTrackingDetailsOrBuilder() { + if ((detailsCase_ == 7) && (videoObjectTrackingDetailsBuilder_ != null)) { + return videoObjectTrackingDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectTrackingOperationMetadataOrBuilder> + getVideoObjectTrackingDetailsFieldBuilder() { + if (videoObjectTrackingDetailsBuilder_ == null) { + if (!(detailsCase_ == 7)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .getDefaultInstance(); + } + videoObjectTrackingDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectTrackingOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 7; + onChanged(); + ; + return videoObjectTrackingDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadataOrBuilder> + videoEventDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + public boolean hasVideoEventDetails() { + return detailsCase_ == 8; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + getVideoEventDetails() { + if (videoEventDetailsBuilder_ == null) { + if (detailsCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 8) { + return videoEventDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + public Builder setVideoEventDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata value) { + if (videoEventDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + videoEventDetailsBuilder_.setMessage(value); + } + detailsCase_ = 8; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + public Builder setVideoEventDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.Builder + builderForValue) { + if (videoEventDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + videoEventDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 8; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + public Builder mergeVideoEventDetails( + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata value) { + if (videoEventDetailsBuilder_ == null) { + if (detailsCase_ == 8 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.newBuilder( + (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 8) { + videoEventDetailsBuilder_.mergeFrom(value); + } + videoEventDetailsBuilder_.setMessage(value); + } + detailsCase_ = 8; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + public Builder clearVideoEventDetails() { + if (videoEventDetailsBuilder_ == null) { + if (detailsCase_ == 8) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 8) { + detailsCase_ = 0; + details_ = null; + } + videoEventDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.Builder + getVideoEventDetailsBuilder() { + return getVideoEventDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadataOrBuilder + getVideoEventDetailsOrBuilder() { + if ((detailsCase_ == 8) && (videoEventDetailsBuilder_ != null)) { + return videoEventDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 8) { + return (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadataOrBuilder> + getVideoEventDetailsFieldBuilder() { + if (videoEventDetailsBuilder_ == null) { + if (!(detailsCase_ == 8)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + .getDefaultInstance(); + } + videoEventDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 8; + onChanged(); + ; + return videoEventDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadataOrBuilder> + textClassificationDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + public boolean hasTextClassificationDetails() { + return detailsCase_ == 9; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + getTextClassificationDetails() { + if (textClassificationDetailsBuilder_ == null) { + if (detailsCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 9) { + return textClassificationDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + public Builder setTextClassificationDetails( + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata value) { + if (textClassificationDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + textClassificationDetailsBuilder_.setMessage(value); + } + detailsCase_ = 9; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + public Builder setTextClassificationDetails( + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata.Builder + builderForValue) { + if (textClassificationDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + textClassificationDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 9; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + public Builder mergeTextClassificationDetails( + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata value) { + if (textClassificationDetailsBuilder_ == null) { + if (detailsCase_ == 9 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .newBuilder( + (com.google.cloud.datalabeling.v1beta1 + .LabelTextClassificationOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 9) { + textClassificationDetailsBuilder_.mergeFrom(value); + } + textClassificationDetailsBuilder_.setMessage(value); + } + detailsCase_ = 9; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + public Builder clearTextClassificationDetails() { + if (textClassificationDetailsBuilder_ == null) { + if (detailsCase_ == 9) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 9) { + detailsCase_ = 0; + details_ = null; + } + textClassificationDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata.Builder + getTextClassificationDetailsBuilder() { + return getTextClassificationDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadataOrBuilder + getTextClassificationDetailsOrBuilder() { + if ((detailsCase_ == 9) && (textClassificationDetailsBuilder_ != null)) { + return textClassificationDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 9) { + return (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadataOrBuilder> + getTextClassificationDetailsFieldBuilder() { + if (textClassificationDetailsBuilder_ == null) { + if (!(detailsCase_ == 9)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .getDefaultInstance(); + } + textClassificationDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelTextClassificationOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 9; + onChanged(); + ; + return textClassificationDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadataOrBuilder> + audioTranscriptionDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + public boolean hasAudioTranscriptionDetails() { + return detailsCase_ == 10; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + getAudioTranscriptionDetails() { + if (audioTranscriptionDetailsBuilder_ == null) { + if (detailsCase_ == 10) { + return (com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 10) { + return audioTranscriptionDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + public Builder setAudioTranscriptionDetails( + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata value) { + if (audioTranscriptionDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + audioTranscriptionDetailsBuilder_.setMessage(value); + } + detailsCase_ = 10; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + public Builder setAudioTranscriptionDetails( + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata.Builder + builderForValue) { + if (audioTranscriptionDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + audioTranscriptionDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 10; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + public Builder mergeAudioTranscriptionDetails( + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata value) { + if (audioTranscriptionDetailsBuilder_ == null) { + if (detailsCase_ == 10 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .newBuilder( + (com.google.cloud.datalabeling.v1beta1 + .LabelAudioTranscriptionOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 10) { + audioTranscriptionDetailsBuilder_.mergeFrom(value); + } + audioTranscriptionDetailsBuilder_.setMessage(value); + } + detailsCase_ = 10; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + public Builder clearAudioTranscriptionDetails() { + if (audioTranscriptionDetailsBuilder_ == null) { + if (detailsCase_ == 10) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 10) { + detailsCase_ = 0; + details_ = null; + } + audioTranscriptionDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata.Builder + getAudioTranscriptionDetailsBuilder() { + return getAudioTranscriptionDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadataOrBuilder + getAudioTranscriptionDetailsOrBuilder() { + if ((detailsCase_ == 10) && (audioTranscriptionDetailsBuilder_ != null)) { + return audioTranscriptionDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 10) { + return (com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata.Builder, + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadataOrBuilder> + getAudioTranscriptionDetailsFieldBuilder() { + if (audioTranscriptionDetailsBuilder_ == null) { + if (!(detailsCase_ == 10)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .getDefaultInstance(); + } + audioTranscriptionDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelAudioTranscriptionOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 10; + onChanged(); + ; + return audioTranscriptionDetailsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelTextEntityExtractionOperationMetadataOrBuilder> + textEntityExtractionDetailsBuilder_; + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + public boolean hasTextEntityExtractionDetails() { + return detailsCase_ == 13; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + getTextEntityExtractionDetails() { + if (textEntityExtractionDetailsBuilder_ == null) { + if (detailsCase_ == 13) { + return (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .getDefaultInstance(); + } else { + if (detailsCase_ == 13) { + return textEntityExtractionDetailsBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + public Builder setTextEntityExtractionDetails( + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata value) { + if (textEntityExtractionDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + details_ = value; + onChanged(); + } else { + textEntityExtractionDetailsBuilder_.setMessage(value); + } + detailsCase_ = 13; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + public Builder setTextEntityExtractionDetails( + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata.Builder + builderForValue) { + if (textEntityExtractionDetailsBuilder_ == null) { + details_ = builderForValue.build(); + onChanged(); + } else { + textEntityExtractionDetailsBuilder_.setMessage(builderForValue.build()); + } + detailsCase_ = 13; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + public Builder mergeTextEntityExtractionDetails( + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata value) { + if (textEntityExtractionDetailsBuilder_ == null) { + if (detailsCase_ == 13 + && details_ + != com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .getDefaultInstance()) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .newBuilder( + (com.google.cloud.datalabeling.v1beta1 + .LabelTextEntityExtractionOperationMetadata) + details_) + .mergeFrom(value) + .buildPartial(); + } else { + details_ = value; + } + onChanged(); + } else { + if (detailsCase_ == 13) { + textEntityExtractionDetailsBuilder_.mergeFrom(value); + } + textEntityExtractionDetailsBuilder_.setMessage(value); + } + detailsCase_ = 13; + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + public Builder clearTextEntityExtractionDetails() { + if (textEntityExtractionDetailsBuilder_ == null) { + if (detailsCase_ == 13) { + detailsCase_ = 0; + details_ = null; + onChanged(); + } + } else { + if (detailsCase_ == 13) { + detailsCase_ = 0; + details_ = null; + } + textEntityExtractionDetailsBuilder_.clear(); + } + return this; + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata.Builder + getTextEntityExtractionDetailsBuilder() { + return getTextEntityExtractionDetailsFieldBuilder().getBuilder(); + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadataOrBuilder + getTextEntityExtractionDetailsOrBuilder() { + if ((detailsCase_ == 13) && (textEntityExtractionDetailsBuilder_ != null)) { + return textEntityExtractionDetailsBuilder_.getMessageOrBuilder(); + } else { + if (detailsCase_ == 13) { + return (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + details_; + } + return com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .getDefaultInstance(); + } + } + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelTextEntityExtractionOperationMetadataOrBuilder> + getTextEntityExtractionDetailsFieldBuilder() { + if (textEntityExtractionDetailsBuilder_ == null) { + if (!(detailsCase_ == 13)) { + details_ = + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .getDefaultInstance(); + } + textEntityExtractionDetailsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata, + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .Builder, + com.google.cloud.datalabeling.v1beta1 + .LabelTextEntityExtractionOperationMetadataOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + details_, + getParentForChildren(), + isClean()); + details_ = null; + } + detailsCase_ = 13; + onChanged(); + ; + return textEntityExtractionDetailsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..7d4ad2dd0fe9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelOperationMetadataOrBuilder.java @@ -0,0 +1,357 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Progress of label operation. Range: [0, 100].
+   * Currently not supported.
+   * 
+ * + * int32 progress_percent = 1; + */ + int getProgressPercent(); + + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + java.util.List getPartialFailuresList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + com.google.rpc.Status getPartialFailures(int index); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + int getPartialFailuresCount(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + java.util.List getPartialFailuresOrBuilderList(); + /** + * + * + *
+   * Output only. Partial failures encountered.
+   * E.g. single files that couldn't be read.
+   * Status details field will contain standard GCP error details.
+   * 
+ * + * repeated .google.rpc.Status partial_failures = 2; + */ + com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + boolean hasImageClassificationDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata + getImageClassificationDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadata image_classification_details = 3; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImageClassificationOperationMetadataOrBuilder + getImageClassificationDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + boolean hasImageBoundingBoxDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata + getImageBoundingBoxDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingBoxOperationMetadataOrBuilder + getImageBoundingBoxDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + boolean hasImageBoundingPolyDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata + getImageBoundingPolyDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImageBoundingPolyOperationMetadataOrBuilder + getImageBoundingPolyDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + boolean hasImageOrientedBoundingBoxDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata + getImageOrientedBoundingBoxDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadata image_oriented_bounding_box_details = 14; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImageOrientedBoundingBoxOperationMetadataOrBuilder + getImageOrientedBoundingBoxDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + boolean hasImagePolylineDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata + getImagePolylineDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadata image_polyline_details = 12; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImagePolylineOperationMetadataOrBuilder + getImagePolylineDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + boolean hasImageSegmentationDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata + getImageSegmentationDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelImageSegmentationOperationMetadataOrBuilder + getImageSegmentationDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + boolean hasVideoClassificationDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + getVideoClassificationDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata video_classification_details = 5; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadataOrBuilder + getVideoClassificationDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + boolean hasVideoObjectDetectionDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + getVideoObjectDetectionDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata video_object_detection_details = 6; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadataOrBuilder + getVideoObjectDetectionDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + boolean hasVideoObjectTrackingDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + getVideoObjectTrackingDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadataOrBuilder + getVideoObjectTrackingDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + boolean hasVideoEventDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata getVideoEventDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata video_event_details = 8; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadataOrBuilder + getVideoEventDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + boolean hasTextClassificationDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + getTextClassificationDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata text_classification_details = 9; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadataOrBuilder + getTextClassificationDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + boolean hasAudioTranscriptionDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata + getAudioTranscriptionDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelAudioTranscriptionOperationMetadataOrBuilder + getAudioTranscriptionDetailsOrBuilder(); + + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + boolean hasTextEntityExtractionDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + getTextEntityExtractionDetails(); + /** + * + * .google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = 13; + * + */ + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadataOrBuilder + getTextEntityExtractionDetailsOrBuilder(); + + public com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata.DetailsCase getDetailsCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelStats.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelStats.java new file mode 100644 index 000000000000..1805a9144276 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelStats.java @@ -0,0 +1,762 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Statistics about annotation specs.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelStats} + */ +public final class LabelStats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelStats) + LabelStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelStats.newBuilder() to construct. + private LabelStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelStats() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + exampleCount_ = + com.google.protobuf.MapField.newMapField( + ExampleCountDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry exampleCount__ = + input.readMessage( + ExampleCountDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + exampleCount_.getMutableMap().put(exampleCount__.getKey(), exampleCount__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelStats_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetExampleCount(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelStats.class, + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder.class); + } + + public static final int EXAMPLE_COUNT_FIELD_NUMBER = 1; + + private static final class ExampleCountDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelStats_ExampleCountEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + + private com.google.protobuf.MapField exampleCount_; + + private com.google.protobuf.MapField internalGetExampleCount() { + if (exampleCount_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExampleCountDefaultEntryHolder.defaultEntry); + } + return exampleCount_; + } + + public int getExampleCountCount() { + return internalGetExampleCount().getMap().size(); + } + /** + * + * + *
+   * Map of each annotation spec's example count. Key is the annotation spec
+   * name and value is the number of examples for that annotation spec.
+   * 
+ * + * map<string, int64> example_count = 1; + */ + public boolean containsExampleCount(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetExampleCount().getMap().containsKey(key); + } + /** Use {@link #getExampleCountMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getExampleCount() { + return getExampleCountMap(); + } + /** + * + * + *
+   * Map of each annotation spec's example count. Key is the annotation spec
+   * name and value is the number of examples for that annotation spec.
+   * 
+ * + * map<string, int64> example_count = 1; + */ + public java.util.Map getExampleCountMap() { + return internalGetExampleCount().getMap(); + } + /** + * + * + *
+   * Map of each annotation spec's example count. Key is the annotation spec
+   * name and value is the number of examples for that annotation spec.
+   * 
+ * + * map<string, int64> example_count = 1; + */ + public long getExampleCountOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetExampleCount().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Map of each annotation spec's example count. Key is the annotation spec
+   * name and value is the number of examples for that annotation spec.
+   * 
+ * + * map<string, int64> example_count = 1; + */ + public long getExampleCountOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetExampleCount().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetExampleCount(), ExampleCountDefaultEntryHolder.defaultEntry, 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetExampleCount().getMap().entrySet()) { + com.google.protobuf.MapEntry exampleCount__ = + ExampleCountDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, exampleCount__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.LabelStats)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelStats other = + (com.google.cloud.datalabeling.v1beta1.LabelStats) obj; + + if (!internalGetExampleCount().equals(other.internalGetExampleCount())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetExampleCount().getMap().isEmpty()) { + hash = (37 * hash) + EXAMPLE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + internalGetExampleCount().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.LabelStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Statistics about annotation specs.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelStats} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelStats) + com.google.cloud.datalabeling.v1beta1.LabelStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelStats_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetExampleCount(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 1: + return internalGetMutableExampleCount(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelStats.class, + com.google.cloud.datalabeling.v1beta1.LabelStats.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.LabelStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableExampleCount().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelStats_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelStats getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelStats.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelStats build() { + com.google.cloud.datalabeling.v1beta1.LabelStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelStats buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelStats result = + new com.google.cloud.datalabeling.v1beta1.LabelStats(this); + int from_bitField0_ = bitField0_; + result.exampleCount_ = internalGetExampleCount(); + result.exampleCount_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.LabelStats) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.LabelStats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.LabelStats other) { + if (other == com.google.cloud.datalabeling.v1beta1.LabelStats.getDefaultInstance()) + return this; + internalGetMutableExampleCount().mergeFrom(other.internalGetExampleCount()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datalabeling.v1beta1.LabelStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.MapField exampleCount_; + + private com.google.protobuf.MapField + internalGetExampleCount() { + if (exampleCount_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ExampleCountDefaultEntryHolder.defaultEntry); + } + return exampleCount_; + } + + private com.google.protobuf.MapField + internalGetMutableExampleCount() { + onChanged(); + ; + if (exampleCount_ == null) { + exampleCount_ = + com.google.protobuf.MapField.newMapField(ExampleCountDefaultEntryHolder.defaultEntry); + } + if (!exampleCount_.isMutable()) { + exampleCount_ = exampleCount_.copy(); + } + return exampleCount_; + } + + public int getExampleCountCount() { + return internalGetExampleCount().getMap().size(); + } + /** + * + * + *
+     * Map of each annotation spec's example count. Key is the annotation spec
+     * name and value is the number of examples for that annotation spec.
+     * 
+ * + * map<string, int64> example_count = 1; + */ + public boolean containsExampleCount(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetExampleCount().getMap().containsKey(key); + } + /** Use {@link #getExampleCountMap()} instead. */ + @java.lang.Deprecated + public java.util.Map getExampleCount() { + return getExampleCountMap(); + } + /** + * + * + *
+     * Map of each annotation spec's example count. Key is the annotation spec
+     * name and value is the number of examples for that annotation spec.
+     * 
+ * + * map<string, int64> example_count = 1; + */ + public java.util.Map getExampleCountMap() { + return internalGetExampleCount().getMap(); + } + /** + * + * + *
+     * Map of each annotation spec's example count. Key is the annotation spec
+     * name and value is the number of examples for that annotation spec.
+     * 
+ * + * map<string, int64> example_count = 1; + */ + public long getExampleCountOrDefault(java.lang.String key, long defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetExampleCount().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Map of each annotation spec's example count. Key is the annotation spec
+     * name and value is the number of examples for that annotation spec.
+     * 
+ * + * map<string, int64> example_count = 1; + */ + public long getExampleCountOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetExampleCount().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearExampleCount() { + internalGetMutableExampleCount().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Map of each annotation spec's example count. Key is the annotation spec
+     * name and value is the number of examples for that annotation spec.
+     * 
+ * + * map<string, int64> example_count = 1; + */ + public Builder removeExampleCount(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableExampleCount().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableExampleCount() { + return internalGetMutableExampleCount().getMutableMap(); + } + /** + * + * + *
+     * Map of each annotation spec's example count. Key is the annotation spec
+     * name and value is the number of examples for that annotation spec.
+     * 
+ * + * map<string, int64> example_count = 1; + */ + public Builder putExampleCount(java.lang.String key, long value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + + internalGetMutableExampleCount().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Map of each annotation spec's example count. Key is the annotation spec
+     * name and value is the number of examples for that annotation spec.
+     * 
+ * + * map<string, int64> example_count = 1; + */ + public Builder putAllExampleCount(java.util.Map values) { + internalGetMutableExampleCount().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelStats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelStats) + private static final com.google.cloud.datalabeling.v1beta1.LabelStats DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.LabelStats(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelStatsOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelStatsOrBuilder.java new file mode 100644 index 000000000000..9506e241cba3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelStatsOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelStatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelStats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Map of each annotation spec's example count. Key is the annotation spec
+   * name and value is the number of examples for that annotation spec.
+   * 
+ * + * map<string, int64> example_count = 1; + */ + int getExampleCountCount(); + /** + * + * + *
+   * Map of each annotation spec's example count. Key is the annotation spec
+   * name and value is the number of examples for that annotation spec.
+   * 
+ * + * map<string, int64> example_count = 1; + */ + boolean containsExampleCount(java.lang.String key); + /** Use {@link #getExampleCountMap()} instead. */ + @java.lang.Deprecated + java.util.Map getExampleCount(); + /** + * + * + *
+   * Map of each annotation spec's example count. Key is the annotation spec
+   * name and value is the number of examples for that annotation spec.
+   * 
+ * + * map<string, int64> example_count = 1; + */ + java.util.Map getExampleCountMap(); + /** + * + * + *
+   * Map of each annotation spec's example count. Key is the annotation spec
+   * name and value is the number of examples for that annotation spec.
+   * 
+ * + * map<string, int64> example_count = 1; + */ + long getExampleCountOrDefault(java.lang.String key, long defaultValue); + /** + * + * + *
+   * Map of each annotation spec's example count. Key is the annotation spec
+   * name and value is the number of examples for that annotation spec.
+   * 
+ * + * map<string, int64> example_count = 1; + */ + long getExampleCountOrThrow(java.lang.String key); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextClassificationOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextClassificationOperationMetadata.java new file mode 100644 index 000000000000..70f80d95d093 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextClassificationOperationMetadata.java @@ -0,0 +1,740 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Details of a LabelTextClassification operation metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata} + */ +public final class LabelTextClassificationOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + LabelTextClassificationOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelTextClassificationOperationMetadata.newBuilder() to construct. + private LabelTextClassificationOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelTextClassificationOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelTextClassificationOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextClassificationOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextClassificationOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata.Builder + .class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a LabelTextClassification operation metadata.
+   * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextClassificationOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextClassificationOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata.Builder + .class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextClassificationOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata(this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1 + .LabelTextClassificationOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelTextClassificationOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelTextClassificationOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextClassificationOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextClassificationOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..60b88c354861 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextClassificationOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelTextClassificationOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelTextClassificationOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextEntityExtractionOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextEntityExtractionOperationMetadata.java new file mode 100644 index 000000000000..4a8cf074dbe0 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextEntityExtractionOperationMetadata.java @@ -0,0 +1,746 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Details of a LabelTextEntityExtraction operation metadata.
+ * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata} + */ +public final class LabelTextEntityExtractionOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + LabelTextEntityExtractionOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelTextEntityExtractionOperationMetadata.newBuilder() to construct. + private LabelTextEntityExtractionOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelTextEntityExtractionOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelTextEntityExtractionOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextEntityExtractionOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextEntityExtractionOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata.Builder + .class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a LabelTextEntityExtraction operation metadata.
+   * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextEntityExtractionOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextEntityExtractionOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .class, + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextEntityExtractionOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + build() { + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata( + this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1 + .LabelTextEntityExtractionOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelTextEntityExtractionOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelTextEntityExtractionOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextEntityExtractionOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextEntityExtractionOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..177694e0b736 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextEntityExtractionOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelTextEntityExtractionOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelTextEntityExtractionOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextRequest.java new file mode 100644 index 000000000000..5a2bad56f329 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextRequest.java @@ -0,0 +1,1937 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for LabelText.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelTextRequest} + */ +public final class LabelTextRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelTextRequest) + LabelTextRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelTextRequest.newBuilder() to construct. + private LabelTextRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelTextRequest() { + parent_ = ""; + feature_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelTextRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder subBuilder = + null; + if (requestConfigCase_ == 4) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + requestConfig_) + .toBuilder(); + } + requestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + requestConfig_); + requestConfig_ = subBuilder.buildPartial(); + } + requestConfigCase_ = 4; + break; + } + case 42: + { + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder subBuilder = + null; + if (requestConfigCase_ == 5) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + requestConfig_) + .toBuilder(); + } + requestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + requestConfig_); + requestConfig_ = subBuilder.buildPartial(); + } + requestConfigCase_ = 5; + break; + } + case 48: + { + int rawValue = input.readEnum(); + + feature_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelTextRequest.class, + com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Builder.class); + } + + /** + * + * + *
+   * Text labeling task feature.
+   * 
+ * + * Protobuf enum {@code google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature} + */ + public enum Feature implements com.google.protobuf.ProtocolMessageEnum { + /** FEATURE_UNSPECIFIED = 0; */ + FEATURE_UNSPECIFIED(0), + /** + * + * + *
+     * Label text content to one of more labels.
+     * 
+ * + * TEXT_CLASSIFICATION = 1; + */ + TEXT_CLASSIFICATION(1), + /** + * + * + *
+     * Label entities and their span in text.
+     * 
+ * + * TEXT_ENTITY_EXTRACTION = 2; + */ + TEXT_ENTITY_EXTRACTION(2), + UNRECOGNIZED(-1), + ; + + /** FEATURE_UNSPECIFIED = 0; */ + public static final int FEATURE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Label text content to one of more labels.
+     * 
+ * + * TEXT_CLASSIFICATION = 1; + */ + public static final int TEXT_CLASSIFICATION_VALUE = 1; + /** + * + * + *
+     * Label entities and their span in text.
+     * 
+ * + * TEXT_ENTITY_EXTRACTION = 2; + */ + public static final int TEXT_ENTITY_EXTRACTION_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static Feature valueOf(int value) { + return forNumber(value); + } + + public static Feature forNumber(int value) { + switch (value) { + case 0: + return FEATURE_UNSPECIFIED; + case 1: + return TEXT_CLASSIFICATION; + case 2: + return TEXT_ENTITY_EXTRACTION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Feature findValueByNumber(int number) { + return Feature.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.LabelTextRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Feature[] VALUES = values(); + + public static Feature valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Feature(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature) + } + + private int requestConfigCase_ = 0; + private java.lang.Object requestConfig_; + + public enum RequestConfigCase implements com.google.protobuf.Internal.EnumLite { + TEXT_CLASSIFICATION_CONFIG(4), + TEXT_ENTITY_EXTRACTION_CONFIG(5), + REQUESTCONFIG_NOT_SET(0); + private final int value; + + private RequestConfigCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static RequestConfigCase valueOf(int value) { + return forNumber(value); + } + + public static RequestConfigCase forNumber(int value) { + switch (value) { + case 4: + return TEXT_CLASSIFICATION_CONFIG; + case 5: + return TEXT_ENTITY_EXTRACTION_CONFIG; + case 0: + return REQUESTCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RequestConfigCase getRequestConfigCase() { + return RequestConfigCase.forNumber(requestConfigCase_); + } + + public static final int TEXT_CLASSIFICATION_CONFIG_FIELD_NUMBER = 4; + /** + * + * + *
+   * Configuration for text classification task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + public boolean hasTextClassificationConfig() { + return requestConfigCase_ == 4; + } + /** + * + * + *
+   * Configuration for text classification task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfig + getTextClassificationConfig() { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for text classification task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder + getTextClassificationConfigOrBuilder() { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } + + public static final int TEXT_ENTITY_EXTRACTION_CONFIG_FIELD_NUMBER = 5; + /** + * + * + *
+   * Configuration for entity extraction task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + public boolean hasTextEntityExtractionConfig() { + return requestConfigCase_ == 5; + } + /** + * + * + *
+   * Configuration for entity extraction task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + getTextEntityExtractionConfig() { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for entity extraction task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder + getTextEntityExtractionConfigOrBuilder() { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.getDefaultInstance(); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Name of the data set to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the data set to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + public static final int FEATURE_FIELD_NUMBER = 6; + private int feature_; + /** + * + * + *
+   * Required. The type of text labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature feature = 6; + */ + public int getFeatureValue() { + return feature_; + } + /** + * + * + *
+   * Required. The type of text labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature feature = 6; + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature getFeature() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature result = + com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature.valueOf(feature_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (basicConfig_ != null) { + output.writeMessage(2, getBasicConfig()); + } + if (requestConfigCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) requestConfig_); + } + if (requestConfigCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) requestConfig_); + } + if (feature_ + != com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature.FEATURE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, feature_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBasicConfig()); + } + if (requestConfigCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) requestConfig_); + } + if (requestConfigCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) requestConfig_); + } + if (feature_ + != com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature.FEATURE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, feature_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.LabelTextRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelTextRequest other = + (com.google.cloud.datalabeling.v1beta1.LabelTextRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (feature_ != other.feature_) return false; + if (!getRequestConfigCase().equals(other.getRequestConfigCase())) return false; + switch (requestConfigCase_) { + case 4: + if (!getTextClassificationConfig().equals(other.getTextClassificationConfig())) + return false; + break; + case 5: + if (!getTextEntityExtractionConfig().equals(other.getTextEntityExtractionConfig())) + return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (37 * hash) + FEATURE_FIELD_NUMBER; + hash = (53 * hash) + feature_; + switch (requestConfigCase_) { + case 4: + hash = (37 * hash) + TEXT_CLASSIFICATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTextClassificationConfig().hashCode(); + break; + case 5: + hash = (37 * hash) + TEXT_ENTITY_EXTRACTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTextEntityExtractionConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelTextRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for LabelText.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelTextRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelTextRequest) + com.google.cloud.datalabeling.v1beta1.LabelTextRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelTextRequest.class, + com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.LabelTextRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + feature_ = 0; + + requestConfigCase_ = 0; + requestConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelTextRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelTextRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextRequest build() { + com.google.cloud.datalabeling.v1beta1.LabelTextRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelTextRequest result = + new com.google.cloud.datalabeling.v1beta1.LabelTextRequest(this); + if (requestConfigCase_ == 4) { + if (textClassificationConfigBuilder_ == null) { + result.requestConfig_ = requestConfig_; + } else { + result.requestConfig_ = textClassificationConfigBuilder_.build(); + } + } + if (requestConfigCase_ == 5) { + if (textEntityExtractionConfigBuilder_ == null) { + result.requestConfig_ = requestConfig_; + } else { + result.requestConfig_ = textEntityExtractionConfigBuilder_.build(); + } + } + result.parent_ = parent_; + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + result.feature_ = feature_; + result.requestConfigCase_ = requestConfigCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.LabelTextRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.LabelTextRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.LabelTextRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.LabelTextRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + if (other.feature_ != 0) { + setFeatureValue(other.getFeatureValue()); + } + switch (other.getRequestConfigCase()) { + case TEXT_CLASSIFICATION_CONFIG: + { + mergeTextClassificationConfig(other.getTextClassificationConfig()); + break; + } + case TEXT_ENTITY_EXTRACTION_CONFIG: + { + mergeTextEntityExtractionConfig(other.getTextEntityExtractionConfig()); + break; + } + case REQUESTCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelTextRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelTextRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int requestConfigCase_ = 0; + private java.lang.Object requestConfig_; + + public RequestConfigCase getRequestConfigCase() { + return RequestConfigCase.forNumber(requestConfigCase_); + } + + public Builder clearRequestConfig() { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder> + textClassificationConfigBuilder_; + /** + * + * + *
+     * Configuration for text classification task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + public boolean hasTextClassificationConfig() { + return requestConfigCase_ == 4; + } + /** + * + * + *
+     * Configuration for text classification task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfig + getTextClassificationConfig() { + if (textClassificationConfigBuilder_ == null) { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } else { + if (requestConfigCase_ == 4) { + return textClassificationConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for text classification task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + public Builder setTextClassificationConfig( + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig value) { + if (textClassificationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestConfig_ = value; + onChanged(); + } else { + textClassificationConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for text classification task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + public Builder setTextClassificationConfig( + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder builderForValue) { + if (textClassificationConfigBuilder_ == null) { + requestConfig_ = builderForValue.build(); + onChanged(); + } else { + textClassificationConfigBuilder_.setMessage(builderForValue.build()); + } + requestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for text classification task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + public Builder mergeTextClassificationConfig( + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig value) { + if (textClassificationConfigBuilder_ == null) { + if (requestConfigCase_ == 4 + && requestConfig_ + != com.google.cloud.datalabeling.v1beta1.TextClassificationConfig + .getDefaultInstance()) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + requestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + requestConfig_ = value; + } + onChanged(); + } else { + if (requestConfigCase_ == 4) { + textClassificationConfigBuilder_.mergeFrom(value); + } + textClassificationConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for text classification task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + public Builder clearTextClassificationConfig() { + if (textClassificationConfigBuilder_ == null) { + if (requestConfigCase_ == 4) { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + } + } else { + if (requestConfigCase_ == 4) { + requestConfigCase_ = 0; + requestConfig_ = null; + } + textClassificationConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for text classification task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder + getTextClassificationConfigBuilder() { + return getTextClassificationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for text classification task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder + getTextClassificationConfigOrBuilder() { + if ((requestConfigCase_ == 4) && (textClassificationConfigBuilder_ != null)) { + return textClassificationConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for text classification task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder> + getTextClassificationConfigFieldBuilder() { + if (textClassificationConfigBuilder_ == null) { + if (!(requestConfigCase_ == 4)) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } + textClassificationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) requestConfig_, + getParentForChildren(), + isClean()); + requestConfig_ = null; + } + requestConfigCase_ = 4; + onChanged(); + ; + return textClassificationConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder> + textEntityExtractionConfigBuilder_; + /** + * + * + *
+     * Configuration for entity extraction task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + public boolean hasTextEntityExtractionConfig() { + return requestConfigCase_ == 5; + } + /** + * + * + *
+     * Configuration for entity extraction task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + getTextEntityExtractionConfig() { + if (textEntityExtractionConfigBuilder_ == null) { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + .getDefaultInstance(); + } else { + if (requestConfigCase_ == 5) { + return textEntityExtractionConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for entity extraction task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + public Builder setTextEntityExtractionConfig( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig value) { + if (textEntityExtractionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestConfig_ = value; + onChanged(); + } else { + textEntityExtractionConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for entity extraction task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + public Builder setTextEntityExtractionConfig( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder builderForValue) { + if (textEntityExtractionConfigBuilder_ == null) { + requestConfig_ = builderForValue.build(); + onChanged(); + } else { + textEntityExtractionConfigBuilder_.setMessage(builderForValue.build()); + } + requestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for entity extraction task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + public Builder mergeTextEntityExtractionConfig( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig value) { + if (textEntityExtractionConfigBuilder_ == null) { + if (requestConfigCase_ == 5 + && requestConfig_ + != com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + .getDefaultInstance()) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + requestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + requestConfig_ = value; + } + onChanged(); + } else { + if (requestConfigCase_ == 5) { + textEntityExtractionConfigBuilder_.mergeFrom(value); + } + textEntityExtractionConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for entity extraction task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + public Builder clearTextEntityExtractionConfig() { + if (textEntityExtractionConfigBuilder_ == null) { + if (requestConfigCase_ == 5) { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + } + } else { + if (requestConfigCase_ == 5) { + requestConfigCase_ = 0; + requestConfig_ = null; + } + textEntityExtractionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for entity extraction task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder + getTextEntityExtractionConfigBuilder() { + return getTextEntityExtractionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for entity extraction task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder + getTextEntityExtractionConfigOrBuilder() { + if ((requestConfigCase_ == 5) && (textEntityExtractionConfigBuilder_ != null)) { + return textEntityExtractionConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for entity extraction task.
+     * One of text_classification_config and text_entity_extraction_config
+     * is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder> + getTextEntityExtractionConfigFieldBuilder() { + if (textEntityExtractionConfigBuilder_ == null) { + if (!(requestConfigCase_ == 5)) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.getDefaultInstance(); + } + textEntityExtractionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) requestConfig_, + getParentForChildren(), + isClean()); + requestConfig_ = null; + } + requestConfigCase_ = 5; + onChanged(); + ; + return textEntityExtractionConfigBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Name of the data set to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the data set to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the data set to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the data set to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the data set to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + private int feature_ = 0; + /** + * + * + *
+     * Required. The type of text labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature feature = 6; + */ + public int getFeatureValue() { + return feature_; + } + /** + * + * + *
+     * Required. The type of text labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature feature = 6; + */ + public Builder setFeatureValue(int value) { + feature_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of text labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature feature = 6; + */ + public com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature getFeature() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature result = + com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature.valueOf(feature_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The type of text labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature feature = 6; + */ + public Builder setFeature( + com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature value) { + if (value == null) { + throw new NullPointerException(); + } + + feature_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of text labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature feature = 6; + */ + public Builder clearFeature() { + + feature_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelTextRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelTextRequest) + private static final com.google.cloud.datalabeling.v1beta1.LabelTextRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.LabelTextRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelTextRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelTextRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelTextRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelTextRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextRequestOrBuilder.java new file mode 100644 index 000000000000..d78e4729ee7c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelTextRequestOrBuilder.java @@ -0,0 +1,176 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelTextRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelTextRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Configuration for text classification task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + boolean hasTextClassificationConfig(); + /** + * + * + *
+   * Configuration for text classification task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig getTextClassificationConfig(); + /** + * + * + *
+   * Configuration for text classification task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextClassificationConfig text_classification_config = 4; + * + */ + com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder + getTextClassificationConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for entity extraction task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + boolean hasTextEntityExtractionConfig(); + /** + * + * + *
+   * Configuration for entity extraction task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig getTextEntityExtractionConfig(); + /** + * + * + *
+   * Configuration for entity extraction task.
+   * One of text_classification_config and text_entity_extraction_config
+   * is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig text_entity_extraction_config = 5; + * + */ + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder + getTextEntityExtractionConfigOrBuilder(); + + /** + * + * + *
+   * Required. Name of the data set to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Name of the data set to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); + + /** + * + * + *
+   * Required. The type of text labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature feature = 6; + */ + int getFeatureValue(); + /** + * + * + *
+   * Required. The type of text labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature feature = 6; + */ + com.google.cloud.datalabeling.v1beta1.LabelTextRequest.Feature getFeature(); + + public com.google.cloud.datalabeling.v1beta1.LabelTextRequest.RequestConfigCase + getRequestConfigCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoClassificationOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoClassificationOperationMetadata.java new file mode 100644 index 000000000000..da33cacb5956 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoClassificationOperationMetadata.java @@ -0,0 +1,742 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Details of a LabelVideoClassification operation metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata} + */ +public final class LabelVideoClassificationOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + LabelVideoClassificationOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelVideoClassificationOperationMetadata.newBuilder() to construct. + private LabelVideoClassificationOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelVideoClassificationOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelVideoClassificationOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoClassificationOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoClassificationOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata.Builder + .class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a LabelVideoClassification operation metadata.
+   * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoClassificationOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoClassificationOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoClassificationOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata(this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1 + .LabelVideoClassificationOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelVideoClassificationOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelVideoClassificationOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoClassificationOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoClassificationOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..3dfed983af16 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoClassificationOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelVideoClassificationOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelVideoClassificationOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoEventOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoEventOperationMetadata.java new file mode 100644 index 000000000000..23aa01aaaabb --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoEventOperationMetadata.java @@ -0,0 +1,723 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Details of a LabelVideoEvent operation metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata} + */ +public final class LabelVideoEventOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) + LabelVideoEventOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelVideoEventOperationMetadata.newBuilder() to construct. + private LabelVideoEventOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelVideoEventOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelVideoEventOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoEventOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoEventOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.Builder.class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a LabelVideoEvent operation metadata.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoEventOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoEventOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoEventOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata(this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelVideoEventOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelVideoEventOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoEventOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoEventOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..7d8da5795db1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoEventOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelVideoEventOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelVideoEventOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectDetectionOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectDetectionOperationMetadata.java new file mode 100644 index 000000000000..19425d417206 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectDetectionOperationMetadata.java @@ -0,0 +1,746 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Details of a LabelVideoObjectDetection operation metadata.
+ * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata} + */ +public final class LabelVideoObjectDetectionOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + LabelVideoObjectDetectionOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelVideoObjectDetectionOperationMetadata.newBuilder() to construct. + private LabelVideoObjectDetectionOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelVideoObjectDetectionOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelVideoObjectDetectionOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectDetectionOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectDetectionOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata.Builder + .class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a LabelVideoObjectDetection operation metadata.
+   * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectDetectionOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectDetectionOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .class, + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectDetectionOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + build() { + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata( + this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectDetectionOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelVideoObjectDetectionOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelVideoObjectDetectionOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectDetectionOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectDetectionOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..d0e1cf93b416 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectDetectionOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelVideoObjectDetectionOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelVideoObjectDetectionOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectTrackingOperationMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectTrackingOperationMetadata.java new file mode 100644 index 000000000000..7e6cd96e1e40 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectTrackingOperationMetadata.java @@ -0,0 +1,742 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Details of a LabelVideoObjectTracking operation metadata.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata} + */ +public final class LabelVideoObjectTrackingOperationMetadata + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + LabelVideoObjectTrackingOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelVideoObjectTrackingOperationMetadata.newBuilder() to construct. + private LabelVideoObjectTrackingOperationMetadata( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelVideoObjectTrackingOperationMetadata() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelVideoObjectTrackingOperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectTrackingOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectTrackingOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata.Builder + .class); + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (basicConfig_ != null) { + output.writeMessage(1, getBasicConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasicConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata other = + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) obj; + + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Details of a LabelVideoObjectTracking operation metadata.
+   * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectTrackingOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectTrackingOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata.class, + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.Operations + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectTrackingOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata build() { + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata result = + new com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata(this); + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata other) { + if (other + == com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + .getDefaultInstance()) return this; + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Basic human annotation config used in labeling request.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + private static final com.google.cloud.datalabeling.v1beta1 + .LabelVideoObjectTrackingOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelVideoObjectTrackingOperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelVideoObjectTrackingOperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectTrackingOperationMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectTrackingOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..98ec43158681 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoObjectTrackingOperationMetadataOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelVideoObjectTrackingOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelVideoObjectTrackingOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Basic human annotation config used in labeling request.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 1; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoRequest.java new file mode 100644 index 000000000000..8e9c2d9183f2 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoRequest.java @@ -0,0 +1,2621 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for LabelVideo.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelVideoRequest} + */ +public final class LabelVideoRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.LabelVideoRequest) + LabelVideoRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use LabelVideoRequest.newBuilder() to construct. + private LabelVideoRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private LabelVideoRequest() { + parent_ = ""; + feature_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private LabelVideoRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder subBuilder = null; + if (basicConfig_ != null) { + subBuilder = basicConfig_.toBuilder(); + } + basicConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basicConfig_); + basicConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + int rawValue = input.readEnum(); + + feature_ = rawValue; + break; + } + case 34: + { + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder subBuilder = + null; + if (requestConfigCase_ == 4) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + requestConfig_) + .toBuilder(); + } + requestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + requestConfig_); + requestConfig_ = subBuilder.buildPartial(); + } + requestConfigCase_ = 4; + break; + } + case 42: + { + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder subBuilder = null; + if (requestConfigCase_ == 5) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) requestConfig_) + .toBuilder(); + } + requestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) requestConfig_); + requestConfig_ = subBuilder.buildPartial(); + } + requestConfigCase_ = 5; + break; + } + case 50: + { + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder subBuilder = null; + if (requestConfigCase_ == 6) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) requestConfig_) + .toBuilder(); + } + requestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) requestConfig_); + requestConfig_ = subBuilder.buildPartial(); + } + requestConfigCase_ = 6; + break; + } + case 58: + { + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder subBuilder = null; + if (requestConfigCase_ == 7) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.EventConfig) requestConfig_) + .toBuilder(); + } + requestConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.EventConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.EventConfig) requestConfig_); + requestConfig_ = subBuilder.buildPartial(); + } + requestConfigCase_ = 7; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.class, + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Builder.class); + } + + /** + * + * + *
+   * Video labeling task feature.
+   * 
+ * + * Protobuf enum {@code google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature} + */ + public enum Feature implements com.google.protobuf.ProtocolMessageEnum { + /** FEATURE_UNSPECIFIED = 0; */ + FEATURE_UNSPECIFIED(0), + /** + * + * + *
+     * Label whole video or video segment with one or more labels.
+     * 
+ * + * CLASSIFICATION = 1; + */ + CLASSIFICATION(1), + /** + * + * + *
+     * Label objects with bounding box on image frames extracted from the video.
+     * 
+ * + * OBJECT_DETECTION = 2; + */ + OBJECT_DETECTION(2), + /** + * + * + *
+     * Label and track objects in video.
+     * 
+ * + * OBJECT_TRACKING = 3; + */ + OBJECT_TRACKING(3), + /** + * + * + *
+     * Label the range of video for the specified events.
+     * 
+ * + * EVENT = 4; + */ + EVENT(4), + UNRECOGNIZED(-1), + ; + + /** FEATURE_UNSPECIFIED = 0; */ + public static final int FEATURE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Label whole video or video segment with one or more labels.
+     * 
+ * + * CLASSIFICATION = 1; + */ + public static final int CLASSIFICATION_VALUE = 1; + /** + * + * + *
+     * Label objects with bounding box on image frames extracted from the video.
+     * 
+ * + * OBJECT_DETECTION = 2; + */ + public static final int OBJECT_DETECTION_VALUE = 2; + /** + * + * + *
+     * Label and track objects in video.
+     * 
+ * + * OBJECT_TRACKING = 3; + */ + public static final int OBJECT_TRACKING_VALUE = 3; + /** + * + * + *
+     * Label the range of video for the specified events.
+     * 
+ * + * EVENT = 4; + */ + public static final int EVENT_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static Feature valueOf(int value) { + return forNumber(value); + } + + public static Feature forNumber(int value) { + switch (value) { + case 0: + return FEATURE_UNSPECIFIED; + case 1: + return CLASSIFICATION; + case 2: + return OBJECT_DETECTION; + case 3: + return OBJECT_TRACKING; + case 4: + return EVENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Feature findValueByNumber(int number) { + return Feature.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Feature[] VALUES = values(); + + public static Feature valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Feature(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature) + } + + private int requestConfigCase_ = 0; + private java.lang.Object requestConfig_; + + public enum RequestConfigCase implements com.google.protobuf.Internal.EnumLite { + VIDEO_CLASSIFICATION_CONFIG(4), + OBJECT_DETECTION_CONFIG(5), + OBJECT_TRACKING_CONFIG(6), + EVENT_CONFIG(7), + REQUESTCONFIG_NOT_SET(0); + private final int value; + + private RequestConfigCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static RequestConfigCase valueOf(int value) { + return forNumber(value); + } + + public static RequestConfigCase forNumber(int value) { + switch (value) { + case 4: + return VIDEO_CLASSIFICATION_CONFIG; + case 5: + return OBJECT_DETECTION_CONFIG; + case 6: + return OBJECT_TRACKING_CONFIG; + case 7: + return EVENT_CONFIG; + case 0: + return REQUESTCONFIG_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public RequestConfigCase getRequestConfigCase() { + return RequestConfigCase.forNumber(requestConfigCase_); + } + + public static final int VIDEO_CLASSIFICATION_CONFIG_FIELD_NUMBER = 4; + /** + * + * + *
+   * Configuration for video classification task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + public boolean hasVideoClassificationConfig() { + return requestConfigCase_ == 4; + } + /** + * + * + *
+   * Configuration for video classification task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + getVideoClassificationConfig() { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for video classification task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder + getVideoClassificationConfigOrBuilder() { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } + + public static final int OBJECT_DETECTION_CONFIG_FIELD_NUMBER = 5; + /** + * + * + *
+   * Configuration for video object detection task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + public boolean hasObjectDetectionConfig() { + return requestConfigCase_ == 5; + } + /** + * + * + *
+   * Configuration for video object detection task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig getObjectDetectionConfig() { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for video object detection task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder + getObjectDetectionConfigOrBuilder() { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } + + public static final int OBJECT_TRACKING_CONFIG_FIELD_NUMBER = 6; + /** + * + * + *
+   * Configuration for video object tracking task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + public boolean hasObjectTrackingConfig() { + return requestConfigCase_ == 6; + } + /** + * + * + *
+   * Configuration for video object tracking task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig getObjectTrackingConfig() { + if (requestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for video object tracking task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder + getObjectTrackingConfigOrBuilder() { + if (requestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } + + public static final int EVENT_CONFIG_FIELD_NUMBER = 7; + /** + * + * + *
+   * Configuration for video event task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + public boolean hasEventConfig() { + return requestConfigCase_ == 7; + } + /** + * + * + *
+   * Configuration for video event task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + public com.google.cloud.datalabeling.v1beta1.EventConfig getEventConfig() { + if (requestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.EventConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } + /** + * + * + *
+   * Configuration for video event task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + public com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder getEventConfigOrBuilder() { + if (requestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.EventConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BASIC_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public boolean hasBasicConfig() { + return basicConfig_ != null; + } + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + return getBasicConfig(); + } + + public static final int FEATURE_FIELD_NUMBER = 3; + private int feature_; + /** + * + * + *
+   * Required. The type of video labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature feature = 3; + */ + public int getFeatureValue() { + return feature_; + } + /** + * + * + *
+   * Required. The type of video labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature feature = 3; + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature getFeature() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature result = + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature.valueOf(feature_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (basicConfig_ != null) { + output.writeMessage(2, getBasicConfig()); + } + if (feature_ + != com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature.FEATURE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, feature_); + } + if (requestConfigCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) requestConfig_); + } + if (requestConfigCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) requestConfig_); + } + if (requestConfigCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) requestConfig_); + } + if (requestConfigCase_ == 7) { + output.writeMessage(7, (com.google.cloud.datalabeling.v1beta1.EventConfig) requestConfig_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (basicConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getBasicConfig()); + } + if (feature_ + != com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature.FEATURE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, feature_); + } + if (requestConfigCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) requestConfig_); + } + if (requestConfigCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) requestConfig_); + } + if (requestConfigCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) requestConfig_); + } + if (requestConfigCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.datalabeling.v1beta1.EventConfig) requestConfig_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.LabelVideoRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest other = + (com.google.cloud.datalabeling.v1beta1.LabelVideoRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasBasicConfig() != other.hasBasicConfig()) return false; + if (hasBasicConfig()) { + if (!getBasicConfig().equals(other.getBasicConfig())) return false; + } + if (feature_ != other.feature_) return false; + if (!getRequestConfigCase().equals(other.getRequestConfigCase())) return false; + switch (requestConfigCase_) { + case 4: + if (!getVideoClassificationConfig().equals(other.getVideoClassificationConfig())) + return false; + break; + case 5: + if (!getObjectDetectionConfig().equals(other.getObjectDetectionConfig())) return false; + break; + case 6: + if (!getObjectTrackingConfig().equals(other.getObjectTrackingConfig())) return false; + break; + case 7: + if (!getEventConfig().equals(other.getEventConfig())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasBasicConfig()) { + hash = (37 * hash) + BASIC_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getBasicConfig().hashCode(); + } + hash = (37 * hash) + FEATURE_FIELD_NUMBER; + hash = (53 * hash) + feature_; + switch (requestConfigCase_) { + case 4: + hash = (37 * hash) + VIDEO_CLASSIFICATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getVideoClassificationConfig().hashCode(); + break; + case 5: + hash = (37 * hash) + OBJECT_DETECTION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getObjectDetectionConfig().hashCode(); + break; + case 6: + hash = (37 * hash) + OBJECT_TRACKING_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getObjectTrackingConfig().hashCode(); + break; + case 7: + hash = (37 * hash) + EVENT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEventConfig().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for LabelVideo.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.LabelVideoRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.LabelVideoRequest) + com.google.cloud.datalabeling.v1beta1.LabelVideoRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.class, + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + feature_ = 0; + + requestConfigCase_ = 0; + requestConfig_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_LabelVideoRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoRequest build() { + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest result = + new com.google.cloud.datalabeling.v1beta1.LabelVideoRequest(this); + if (requestConfigCase_ == 4) { + if (videoClassificationConfigBuilder_ == null) { + result.requestConfig_ = requestConfig_; + } else { + result.requestConfig_ = videoClassificationConfigBuilder_.build(); + } + } + if (requestConfigCase_ == 5) { + if (objectDetectionConfigBuilder_ == null) { + result.requestConfig_ = requestConfig_; + } else { + result.requestConfig_ = objectDetectionConfigBuilder_.build(); + } + } + if (requestConfigCase_ == 6) { + if (objectTrackingConfigBuilder_ == null) { + result.requestConfig_ = requestConfig_; + } else { + result.requestConfig_ = objectTrackingConfigBuilder_.build(); + } + } + if (requestConfigCase_ == 7) { + if (eventConfigBuilder_ == null) { + result.requestConfig_ = requestConfig_; + } else { + result.requestConfig_ = eventConfigBuilder_.build(); + } + } + result.parent_ = parent_; + if (basicConfigBuilder_ == null) { + result.basicConfig_ = basicConfig_; + } else { + result.basicConfig_ = basicConfigBuilder_.build(); + } + result.feature_ = feature_; + result.requestConfigCase_ = requestConfigCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.LabelVideoRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.LabelVideoRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.LabelVideoRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasBasicConfig()) { + mergeBasicConfig(other.getBasicConfig()); + } + if (other.feature_ != 0) { + setFeatureValue(other.getFeatureValue()); + } + switch (other.getRequestConfigCase()) { + case VIDEO_CLASSIFICATION_CONFIG: + { + mergeVideoClassificationConfig(other.getVideoClassificationConfig()); + break; + } + case OBJECT_DETECTION_CONFIG: + { + mergeObjectDetectionConfig(other.getObjectDetectionConfig()); + break; + } + case OBJECT_TRACKING_CONFIG: + { + mergeObjectTrackingConfig(other.getObjectTrackingConfig()); + break; + } + case EVENT_CONFIG: + { + mergeEventConfig(other.getEventConfig()); + break; + } + case REQUESTCONFIG_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.LabelVideoRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int requestConfigCase_ = 0; + private java.lang.Object requestConfig_; + + public RequestConfigCase getRequestConfigCase() { + return RequestConfigCase.forNumber(requestConfigCase_); + } + + public Builder clearRequestConfig() { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder> + videoClassificationConfigBuilder_; + /** + * + * + *
+     * Configuration for video classification task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + public boolean hasVideoClassificationConfig() { + return requestConfigCase_ == 4; + } + /** + * + * + *
+     * Configuration for video classification task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + getVideoClassificationConfig() { + if (videoClassificationConfigBuilder_ == null) { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } else { + if (requestConfigCase_ == 4) { + return videoClassificationConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video classification task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + public Builder setVideoClassificationConfig( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig value) { + if (videoClassificationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestConfig_ = value; + onChanged(); + } else { + videoClassificationConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for video classification task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + public Builder setVideoClassificationConfig( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder builderForValue) { + if (videoClassificationConfigBuilder_ == null) { + requestConfig_ = builderForValue.build(); + onChanged(); + } else { + videoClassificationConfigBuilder_.setMessage(builderForValue.build()); + } + requestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for video classification task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + public Builder mergeVideoClassificationConfig( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig value) { + if (videoClassificationConfigBuilder_ == null) { + if (requestConfigCase_ == 4 + && requestConfig_ + != com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .getDefaultInstance()) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + requestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + requestConfig_ = value; + } + onChanged(); + } else { + if (requestConfigCase_ == 4) { + videoClassificationConfigBuilder_.mergeFrom(value); + } + videoClassificationConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 4; + return this; + } + /** + * + * + *
+     * Configuration for video classification task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + public Builder clearVideoClassificationConfig() { + if (videoClassificationConfigBuilder_ == null) { + if (requestConfigCase_ == 4) { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + } + } else { + if (requestConfigCase_ == 4) { + requestConfigCase_ = 0; + requestConfig_ = null; + } + videoClassificationConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for video classification task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder + getVideoClassificationConfigBuilder() { + return getVideoClassificationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for video classification task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder + getVideoClassificationConfigOrBuilder() { + if ((requestConfigCase_ == 4) && (videoClassificationConfigBuilder_ != null)) { + return videoClassificationConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestConfigCase_ == 4) { + return (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video classification task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder> + getVideoClassificationConfigFieldBuilder() { + if (videoClassificationConfigBuilder_ == null) { + if (!(requestConfigCase_ == 4)) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } + videoClassificationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) requestConfig_, + getParentForChildren(), + isClean()); + requestConfig_ = null; + } + requestConfigCase_ = 4; + onChanged(); + ; + return videoClassificationConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder> + objectDetectionConfigBuilder_; + /** + * + * + *
+     * Configuration for video object detection task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + public boolean hasObjectDetectionConfig() { + return requestConfigCase_ == 5; + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig getObjectDetectionConfig() { + if (objectDetectionConfigBuilder_ == null) { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } else { + if (requestConfigCase_ == 5) { + return objectDetectionConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + public Builder setObjectDetectionConfig( + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig value) { + if (objectDetectionConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestConfig_ = value; + onChanged(); + } else { + objectDetectionConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + public Builder setObjectDetectionConfig( + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder builderForValue) { + if (objectDetectionConfigBuilder_ == null) { + requestConfig_ = builderForValue.build(); + onChanged(); + } else { + objectDetectionConfigBuilder_.setMessage(builderForValue.build()); + } + requestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + public Builder mergeObjectDetectionConfig( + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig value) { + if (objectDetectionConfigBuilder_ == null) { + if (requestConfigCase_ == 5 + && requestConfig_ + != com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig + .getDefaultInstance()) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) requestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + requestConfig_ = value; + } + onChanged(); + } else { + if (requestConfigCase_ == 5) { + objectDetectionConfigBuilder_.mergeFrom(value); + } + objectDetectionConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 5; + return this; + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + public Builder clearObjectDetectionConfig() { + if (objectDetectionConfigBuilder_ == null) { + if (requestConfigCase_ == 5) { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + } + } else { + if (requestConfigCase_ == 5) { + requestConfigCase_ = 0; + requestConfig_ = null; + } + objectDetectionConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder + getObjectDetectionConfigBuilder() { + return getObjectDetectionConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder + getObjectDetectionConfigOrBuilder() { + if ((requestConfigCase_ == 5) && (objectDetectionConfigBuilder_ != null)) { + return objectDetectionConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestConfigCase_ == 5) { + return (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video object detection task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder> + getObjectDetectionConfigFieldBuilder() { + if (objectDetectionConfigBuilder_ == null) { + if (!(requestConfigCase_ == 5)) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } + objectDetectionConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) requestConfig_, + getParentForChildren(), + isClean()); + requestConfig_ = null; + } + requestConfigCase_ = 5; + onChanged(); + ; + return objectDetectionConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder> + objectTrackingConfigBuilder_; + /** + * + * + *
+     * Configuration for video object tracking task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + public boolean hasObjectTrackingConfig() { + return requestConfigCase_ == 6; + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig getObjectTrackingConfig() { + if (objectTrackingConfigBuilder_ == null) { + if (requestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } else { + if (requestConfigCase_ == 6) { + return objectTrackingConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + public Builder setObjectTrackingConfig( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig value) { + if (objectTrackingConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestConfig_ = value; + onChanged(); + } else { + objectTrackingConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + public Builder setObjectTrackingConfig( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder builderForValue) { + if (objectTrackingConfigBuilder_ == null) { + requestConfig_ = builderForValue.build(); + onChanged(); + } else { + objectTrackingConfigBuilder_.setMessage(builderForValue.build()); + } + requestConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + public Builder mergeObjectTrackingConfig( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig value) { + if (objectTrackingConfigBuilder_ == null) { + if (requestConfigCase_ == 6 + && requestConfig_ + != com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig + .getDefaultInstance()) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) requestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + requestConfig_ = value; + } + onChanged(); + } else { + if (requestConfigCase_ == 6) { + objectTrackingConfigBuilder_.mergeFrom(value); + } + objectTrackingConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 6; + return this; + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + public Builder clearObjectTrackingConfig() { + if (objectTrackingConfigBuilder_ == null) { + if (requestConfigCase_ == 6) { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + } + } else { + if (requestConfigCase_ == 6) { + requestConfigCase_ = 0; + requestConfig_ = null; + } + objectTrackingConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder + getObjectTrackingConfigBuilder() { + return getObjectTrackingConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder + getObjectTrackingConfigOrBuilder() { + if ((requestConfigCase_ == 6) && (objectTrackingConfigBuilder_ != null)) { + return objectTrackingConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestConfigCase_ == 6) { + return (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video object tracking task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder> + getObjectTrackingConfigFieldBuilder() { + if (objectTrackingConfigBuilder_ == null) { + if (!(requestConfigCase_ == 6)) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } + objectTrackingConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) requestConfig_, + getParentForChildren(), + isClean()); + requestConfig_ = null; + } + requestConfigCase_ = 6; + onChanged(); + ; + return objectTrackingConfigBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.EventConfig, + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder, + com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder> + eventConfigBuilder_; + /** + * + * + *
+     * Configuration for video event task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + public boolean hasEventConfig() { + return requestConfigCase_ == 7; + } + /** + * + * + *
+     * Configuration for video event task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + public com.google.cloud.datalabeling.v1beta1.EventConfig getEventConfig() { + if (eventConfigBuilder_ == null) { + if (requestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.EventConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } else { + if (requestConfigCase_ == 7) { + return eventConfigBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video event task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + public Builder setEventConfig(com.google.cloud.datalabeling.v1beta1.EventConfig value) { + if (eventConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + requestConfig_ = value; + onChanged(); + } else { + eventConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Configuration for video event task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + public Builder setEventConfig( + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder builderForValue) { + if (eventConfigBuilder_ == null) { + requestConfig_ = builderForValue.build(); + onChanged(); + } else { + eventConfigBuilder_.setMessage(builderForValue.build()); + } + requestConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Configuration for video event task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + public Builder mergeEventConfig(com.google.cloud.datalabeling.v1beta1.EventConfig value) { + if (eventConfigBuilder_ == null) { + if (requestConfigCase_ == 7 + && requestConfig_ + != com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance()) { + requestConfig_ = + com.google.cloud.datalabeling.v1beta1.EventConfig.newBuilder( + (com.google.cloud.datalabeling.v1beta1.EventConfig) requestConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + requestConfig_ = value; + } + onChanged(); + } else { + if (requestConfigCase_ == 7) { + eventConfigBuilder_.mergeFrom(value); + } + eventConfigBuilder_.setMessage(value); + } + requestConfigCase_ = 7; + return this; + } + /** + * + * + *
+     * Configuration for video event task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + public Builder clearEventConfig() { + if (eventConfigBuilder_ == null) { + if (requestConfigCase_ == 7) { + requestConfigCase_ = 0; + requestConfig_ = null; + onChanged(); + } + } else { + if (requestConfigCase_ == 7) { + requestConfigCase_ = 0; + requestConfig_ = null; + } + eventConfigBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Configuration for video event task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + public com.google.cloud.datalabeling.v1beta1.EventConfig.Builder getEventConfigBuilder() { + return getEventConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Configuration for video event task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + public com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder getEventConfigOrBuilder() { + if ((requestConfigCase_ == 7) && (eventConfigBuilder_ != null)) { + return eventConfigBuilder_.getMessageOrBuilder(); + } else { + if (requestConfigCase_ == 7) { + return (com.google.cloud.datalabeling.v1beta1.EventConfig) requestConfig_; + } + return com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } + } + /** + * + * + *
+     * Configuration for video event task.
+     * One of video_classification_config, object_detection_config,
+     * object_tracking_config and event_config is required.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.EventConfig, + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder, + com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder> + getEventConfigFieldBuilder() { + if (eventConfigBuilder_ == null) { + if (!(requestConfigCase_ == 7)) { + requestConfig_ = com.google.cloud.datalabeling.v1beta1.EventConfig.getDefaultInstance(); + } + eventConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.EventConfig, + com.google.cloud.datalabeling.v1beta1.EventConfig.Builder, + com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.EventConfig) requestConfig_, + getParentForChildren(), + isClean()); + requestConfig_ = null; + } + requestConfigCase_ = 7; + onChanged(); + ; + return eventConfigBuilder_; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dataset to request labeling task, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basicConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + basicConfigBuilder_; + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public boolean hasBasicConfig() { + return basicConfigBuilder_ != null || basicConfig_ != null; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig() { + if (basicConfigBuilder_ == null) { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } else { + return basicConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basicConfig_ = value; + onChanged(); + } else { + basicConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder setBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder builderForValue) { + if (basicConfigBuilder_ == null) { + basicConfig_ = builderForValue.build(); + onChanged(); + } else { + basicConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder mergeBasicConfig( + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig value) { + if (basicConfigBuilder_ == null) { + if (basicConfig_ != null) { + basicConfig_ = + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.newBuilder(basicConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + basicConfig_ = value; + } + onChanged(); + } else { + basicConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public Builder clearBasicConfig() { + if (basicConfigBuilder_ == null) { + basicConfig_ = null; + onChanged(); + } else { + basicConfig_ = null; + basicConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder + getBasicConfigBuilder() { + + onChanged(); + return getBasicConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + public com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder + getBasicConfigOrBuilder() { + if (basicConfigBuilder_ != null) { + return basicConfigBuilder_.getMessageOrBuilder(); + } else { + return basicConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.getDefaultInstance() + : basicConfig_; + } + } + /** + * + * + *
+     * Required. Basic human annotation config.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder> + getBasicConfigFieldBuilder() { + if (basicConfigBuilder_ == null) { + basicConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig.Builder, + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder>( + getBasicConfig(), getParentForChildren(), isClean()); + basicConfig_ = null; + } + return basicConfigBuilder_; + } + + private int feature_ = 0; + /** + * + * + *
+     * Required. The type of video labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature feature = 3; + */ + public int getFeatureValue() { + return feature_; + } + /** + * + * + *
+     * Required. The type of video labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature feature = 3; + */ + public Builder setFeatureValue(int value) { + feature_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of video labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature feature = 3; + */ + public com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature getFeature() { + @SuppressWarnings("deprecation") + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature result = + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature.valueOf(feature_); + return result == null + ? com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. The type of video labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature feature = 3; + */ + public Builder setFeature( + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature value) { + if (value == null) { + throw new NullPointerException(); + } + + feature_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of video labeling task.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature feature = 3; + */ + public Builder clearFeature() { + + feature_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.LabelVideoRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.LabelVideoRequest) + private static final com.google.cloud.datalabeling.v1beta1.LabelVideoRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.LabelVideoRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.LabelVideoRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LabelVideoRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LabelVideoRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.LabelVideoRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoRequestOrBuilder.java new file mode 100644 index 000000000000..54fa42d782cc --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/LabelVideoRequestOrBuilder.java @@ -0,0 +1,251 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface LabelVideoRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.LabelVideoRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Configuration for video classification task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + boolean hasVideoClassificationConfig(); + /** + * + * + *
+   * Configuration for video classification task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig getVideoClassificationConfig(); + /** + * + * + *
+   * Configuration for video classification task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * + * .google.cloud.datalabeling.v1beta1.VideoClassificationConfig video_classification_config = 4; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder + getVideoClassificationConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for video object detection task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + boolean hasObjectDetectionConfig(); + /** + * + * + *
+   * Configuration for video object detection task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig getObjectDetectionConfig(); + /** + * + * + *
+   * Configuration for video object detection task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectDetectionConfig object_detection_config = 5; + * + */ + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder + getObjectDetectionConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for video object tracking task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + boolean hasObjectTrackingConfig(); + /** + * + * + *
+   * Configuration for video object tracking task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig getObjectTrackingConfig(); + /** + * + * + *
+   * Configuration for video object tracking task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.ObjectTrackingConfig object_tracking_config = 6; + * + */ + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder + getObjectTrackingConfigOrBuilder(); + + /** + * + * + *
+   * Configuration for video event task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + boolean hasEventConfig(); + /** + * + * + *
+   * Configuration for video event task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + com.google.cloud.datalabeling.v1beta1.EventConfig getEventConfig(); + /** + * + * + *
+   * Configuration for video event task.
+   * One of video_classification_config, object_detection_config,
+   * object_tracking_config and event_config is required.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.EventConfig event_config = 7; + */ + com.google.cloud.datalabeling.v1beta1.EventConfigOrBuilder getEventConfigOrBuilder(); + + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Name of the dataset to request labeling task, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + boolean hasBasicConfig(); + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig getBasicConfig(); + /** + * + * + *
+   * Required. Basic human annotation config.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2; + */ + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOrBuilder getBasicConfigOrBuilder(); + + /** + * + * + *
+   * Required. The type of video labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature feature = 3; + */ + int getFeatureValue(); + /** + * + * + *
+   * Required. The type of video labeling task.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature feature = 3; + */ + com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature getFeature(); + + public com.google.cloud.datalabeling.v1beta1.LabelVideoRequest.RequestConfigCase + getRequestConfigCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsRequest.java new file mode 100644 index 000000000000..558503070f4f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsRequest.java @@ -0,0 +1,1050 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for ListAnnotatedDatasets.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest} + */ +public final class ListAnnotatedDatasetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest) + ListAnnotatedDatasetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAnnotatedDatasetsRequest.newBuilder() to construct. + private ListAnnotatedDatasetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnnotatedDatasetsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAnnotatedDatasetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest.class, + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Name of the dataset to list annotated datasets, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the dataset to list annotated datasets, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListAnnotatedDatasets] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListAnnotatedDatasets] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest other = + (com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListAnnotatedDatasets.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest) + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest.class, + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest build() { + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest result = + new com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Name of the dataset to list annotated datasets, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the dataset to list annotated datasets, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the dataset to list annotated datasets, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dataset to list annotated datasets, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dataset to list annotated datasets, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListAnnotatedDatasets] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListAnnotatedDatasets] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListAnnotatedDatasets] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListAnnotatedDatasets] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListAnnotatedDatasets] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest) + private static final com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnnotatedDatasetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAnnotatedDatasetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsRequestOrBuilder.java new file mode 100644 index 000000000000..8c287d61dbdd --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsRequestOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListAnnotatedDatasetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the dataset to list annotated datasets, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Name of the dataset to list annotated datasets, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListAnnotatedDatasets] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListAnnotatedDatasets] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsResponse.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsResponse.java new file mode 100644 index 000000000000..4d5884f69bc3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsResponse.java @@ -0,0 +1,1144 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Results of listing annotated datasets for a dataset.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse} + */ +public final class ListAnnotatedDatasetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse) + ListAnnotatedDatasetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAnnotatedDatasetsResponse.newBuilder() to construct. + private ListAnnotatedDatasetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnnotatedDatasetsResponse() { + annotatedDatasets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAnnotatedDatasetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotatedDatasets_ = + new java.util.ArrayList< + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset>(); + mutable_bitField0_ |= 0x00000001; + } + annotatedDatasets_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + annotatedDatasets_ = java.util.Collections.unmodifiableList(annotatedDatasets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.class, + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.Builder.class); + } + + private int bitField0_; + public static final int ANNOTATED_DATASETS_FIELD_NUMBER = 1; + private java.util.List annotatedDatasets_; + /** + * + * + *
+   * The list of annotated datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public java.util.List + getAnnotatedDatasetsList() { + return annotatedDatasets_; + } + /** + * + * + *
+   * The list of annotated datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public java.util.List + getAnnotatedDatasetsOrBuilderList() { + return annotatedDatasets_; + } + /** + * + * + *
+   * The list of annotated datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public int getAnnotatedDatasetsCount() { + return annotatedDatasets_.size(); + } + /** + * + * + *
+   * The list of annotated datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDataset getAnnotatedDatasets(int index) { + return annotatedDatasets_.get(index); + } + /** + * + * + *
+   * The list of annotated datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetOrBuilder + getAnnotatedDatasetsOrBuilder(int index) { + return annotatedDatasets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < annotatedDatasets_.size(); i++) { + output.writeMessage(1, annotatedDatasets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < annotatedDatasets_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, annotatedDatasets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse other = + (com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse) obj; + + if (!getAnnotatedDatasetsList().equals(other.getAnnotatedDatasetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnnotatedDatasetsCount() > 0) { + hash = (37 * hash) + ANNOTATED_DATASETS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotatedDatasetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Results of listing annotated datasets for a dataset.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse) + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.class, + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotatedDatasetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotatedDatasetsBuilder_ == null) { + annotatedDatasets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + annotatedDatasetsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotatedDatasetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse build() { + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse result = + new com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (annotatedDatasetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + annotatedDatasets_ = java.util.Collections.unmodifiableList(annotatedDatasets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.annotatedDatasets_ = annotatedDatasets_; + } else { + result.annotatedDatasets_ = annotatedDatasetsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + .getDefaultInstance()) return this; + if (annotatedDatasetsBuilder_ == null) { + if (!other.annotatedDatasets_.isEmpty()) { + if (annotatedDatasets_.isEmpty()) { + annotatedDatasets_ = other.annotatedDatasets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnnotatedDatasetsIsMutable(); + annotatedDatasets_.addAll(other.annotatedDatasets_); + } + onChanged(); + } + } else { + if (!other.annotatedDatasets_.isEmpty()) { + if (annotatedDatasetsBuilder_.isEmpty()) { + annotatedDatasetsBuilder_.dispose(); + annotatedDatasetsBuilder_ = null; + annotatedDatasets_ = other.annotatedDatasets_; + bitField0_ = (bitField0_ & ~0x00000001); + annotatedDatasetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotatedDatasetsFieldBuilder() + : null; + } else { + annotatedDatasetsBuilder_.addAllMessages(other.annotatedDatasets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + annotatedDatasets_ = java.util.Collections.emptyList(); + + private void ensureAnnotatedDatasetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + annotatedDatasets_ = + new java.util.ArrayList( + annotatedDatasets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset, + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetOrBuilder> + annotatedDatasetsBuilder_; + + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public java.util.List + getAnnotatedDatasetsList() { + if (annotatedDatasetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotatedDatasets_); + } else { + return annotatedDatasetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public int getAnnotatedDatasetsCount() { + if (annotatedDatasetsBuilder_ == null) { + return annotatedDatasets_.size(); + } else { + return annotatedDatasetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDataset getAnnotatedDatasets(int index) { + if (annotatedDatasetsBuilder_ == null) { + return annotatedDatasets_.get(index); + } else { + return annotatedDatasetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public Builder setAnnotatedDatasets( + int index, com.google.cloud.datalabeling.v1beta1.AnnotatedDataset value) { + if (annotatedDatasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotatedDatasetsIsMutable(); + annotatedDatasets_.set(index, value); + onChanged(); + } else { + annotatedDatasetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public Builder setAnnotatedDatasets( + int index, com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.Builder builderForValue) { + if (annotatedDatasetsBuilder_ == null) { + ensureAnnotatedDatasetsIsMutable(); + annotatedDatasets_.set(index, builderForValue.build()); + onChanged(); + } else { + annotatedDatasetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public Builder addAnnotatedDatasets( + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset value) { + if (annotatedDatasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotatedDatasetsIsMutable(); + annotatedDatasets_.add(value); + onChanged(); + } else { + annotatedDatasetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public Builder addAnnotatedDatasets( + int index, com.google.cloud.datalabeling.v1beta1.AnnotatedDataset value) { + if (annotatedDatasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotatedDatasetsIsMutable(); + annotatedDatasets_.add(index, value); + onChanged(); + } else { + annotatedDatasetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public Builder addAnnotatedDatasets( + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.Builder builderForValue) { + if (annotatedDatasetsBuilder_ == null) { + ensureAnnotatedDatasetsIsMutable(); + annotatedDatasets_.add(builderForValue.build()); + onChanged(); + } else { + annotatedDatasetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public Builder addAnnotatedDatasets( + int index, com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.Builder builderForValue) { + if (annotatedDatasetsBuilder_ == null) { + ensureAnnotatedDatasetsIsMutable(); + annotatedDatasets_.add(index, builderForValue.build()); + onChanged(); + } else { + annotatedDatasetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public Builder addAllAnnotatedDatasets( + java.lang.Iterable + values) { + if (annotatedDatasetsBuilder_ == null) { + ensureAnnotatedDatasetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotatedDatasets_); + onChanged(); + } else { + annotatedDatasetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public Builder clearAnnotatedDatasets() { + if (annotatedDatasetsBuilder_ == null) { + annotatedDatasets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + annotatedDatasetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public Builder removeAnnotatedDatasets(int index) { + if (annotatedDatasetsBuilder_ == null) { + ensureAnnotatedDatasetsIsMutable(); + annotatedDatasets_.remove(index); + onChanged(); + } else { + annotatedDatasetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.Builder + getAnnotatedDatasetsBuilder(int index) { + return getAnnotatedDatasetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetOrBuilder + getAnnotatedDatasetsOrBuilder(int index) { + if (annotatedDatasetsBuilder_ == null) { + return annotatedDatasets_.get(index); + } else { + return annotatedDatasetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public java.util.List + getAnnotatedDatasetsOrBuilderList() { + if (annotatedDatasetsBuilder_ != null) { + return annotatedDatasetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotatedDatasets_); + } + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.Builder + addAnnotatedDatasetsBuilder() { + return getAnnotatedDatasetsFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.getDefaultInstance()); + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.Builder + addAnnotatedDatasetsBuilder(int index) { + return getAnnotatedDatasetsFieldBuilder() + .addBuilder( + index, com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.getDefaultInstance()); + } + /** + * + * + *
+     * The list of annotated datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + public java.util.List + getAnnotatedDatasetsBuilderList() { + return getAnnotatedDatasetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset, + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetOrBuilder> + getAnnotatedDatasetsFieldBuilder() { + if (annotatedDatasetsBuilder_ == null) { + annotatedDatasetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset, + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetOrBuilder>( + annotatedDatasets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + annotatedDatasets_ = null; + } + return annotatedDatasetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse) + private static final com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnnotatedDatasetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAnnotatedDatasetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsResponseOrBuilder.java new file mode 100644 index 000000000000..bb5aee380296 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotatedDatasetsResponseOrBuilder.java @@ -0,0 +1,89 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListAnnotatedDatasetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of annotated datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + java.util.List getAnnotatedDatasetsList(); + /** + * + * + *
+   * The list of annotated datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.AnnotatedDataset getAnnotatedDatasets(int index); + /** + * + * + *
+   * The list of annotated datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + int getAnnotatedDatasetsCount(); + /** + * + * + *
+   * The list of annotated datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + java.util.List + getAnnotatedDatasetsOrBuilderList(); + /** + * + * + *
+   * The list of annotated datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotatedDataset annotated_datasets = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.AnnotatedDatasetOrBuilder getAnnotatedDatasetsOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsRequest.java new file mode 100644 index 000000000000..6a7397a37b5b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsRequest.java @@ -0,0 +1,1050 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for ListAnnotationSpecSets.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest} + */ +public final class ListAnnotationSpecSetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest) + ListAnnotationSpecSetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAnnotationSpecSetsRequest.newBuilder() to construct. + private ListAnnotationSpecSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnnotationSpecSetsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAnnotationSpecSetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest.class, + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Parent of AnnotationSpecSet resource, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Parent of AnnotationSpecSet resource, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListAnnotationSpecSets] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListAnnotationSpecSets] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest other = + (com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListAnnotationSpecSets.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest) + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest.class, + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest build() { + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest result = + new com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Parent of AnnotationSpecSet resource, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Parent of AnnotationSpecSet resource, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Parent of AnnotationSpecSet resource, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent of AnnotationSpecSet resource, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Parent of AnnotationSpecSet resource, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListAnnotationSpecSets] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListAnnotationSpecSets] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListAnnotationSpecSets] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListAnnotationSpecSets] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListAnnotationSpecSets] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest) + private static final com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnnotationSpecSetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAnnotationSpecSetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsRequestOrBuilder.java new file mode 100644 index 000000000000..24ec0ccd0ced --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsRequestOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListAnnotationSpecSetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Parent of AnnotationSpecSet resource, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Parent of AnnotationSpecSet resource, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListAnnotationSpecSets] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListAnnotationSpecSets] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsResponse.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsResponse.java new file mode 100644 index 000000000000..f21555ed6c98 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsResponse.java @@ -0,0 +1,1150 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Results of listing annotation spec set under a project.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse} + */ +public final class ListAnnotationSpecSetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse) + ListAnnotationSpecSetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAnnotationSpecSetsResponse.newBuilder() to construct. + private ListAnnotationSpecSetsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnnotationSpecSetsResponse() { + annotationSpecSets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAnnotationSpecSetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotationSpecSets_ = + new java.util.ArrayList< + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet>(); + mutable_bitField0_ |= 0x00000001; + } + annotationSpecSets_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + annotationSpecSets_ = java.util.Collections.unmodifiableList(annotationSpecSets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.class, + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.Builder.class); + } + + private int bitField0_; + public static final int ANNOTATION_SPEC_SETS_FIELD_NUMBER = 1; + private java.util.List + annotationSpecSets_; + /** + * + * + *
+   * The list of annotation spec sets.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public java.util.List + getAnnotationSpecSetsList() { + return annotationSpecSets_; + } + /** + * + * + *
+   * The list of annotation spec sets.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public java.util.List + getAnnotationSpecSetsOrBuilderList() { + return annotationSpecSets_; + } + /** + * + * + *
+   * The list of annotation spec sets.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public int getAnnotationSpecSetsCount() { + return annotationSpecSets_.size(); + } + /** + * + * + *
+   * The list of annotation spec sets.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet getAnnotationSpecSets(int index) { + return annotationSpecSets_.get(index); + } + /** + * + * + *
+   * The list of annotation spec sets.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder + getAnnotationSpecSetsOrBuilder(int index) { + return annotationSpecSets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < annotationSpecSets_.size(); i++) { + output.writeMessage(1, annotationSpecSets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < annotationSpecSets_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, annotationSpecSets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse other = + (com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse) obj; + + if (!getAnnotationSpecSetsList().equals(other.getAnnotationSpecSetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnnotationSpecSetsCount() > 0) { + hash = (37 * hash) + ANNOTATION_SPEC_SETS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Results of listing annotation spec set under a project.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse) + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.class, + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationSpecSetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotationSpecSetsBuilder_ == null) { + annotationSpecSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + annotationSpecSetsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListAnnotationSpecSetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse build() { + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse result = + new com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (annotationSpecSetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + annotationSpecSets_ = java.util.Collections.unmodifiableList(annotationSpecSets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.annotationSpecSets_ = annotationSpecSets_; + } else { + result.annotationSpecSets_ = annotationSpecSetsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + .getDefaultInstance()) return this; + if (annotationSpecSetsBuilder_ == null) { + if (!other.annotationSpecSets_.isEmpty()) { + if (annotationSpecSets_.isEmpty()) { + annotationSpecSets_ = other.annotationSpecSets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.addAll(other.annotationSpecSets_); + } + onChanged(); + } + } else { + if (!other.annotationSpecSets_.isEmpty()) { + if (annotationSpecSetsBuilder_.isEmpty()) { + annotationSpecSetsBuilder_.dispose(); + annotationSpecSetsBuilder_ = null; + annotationSpecSets_ = other.annotationSpecSets_; + bitField0_ = (bitField0_ & ~0x00000001); + annotationSpecSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotationSpecSetsFieldBuilder() + : null; + } else { + annotationSpecSetsBuilder_.addAllMessages(other.annotationSpecSets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + annotationSpecSets_ = java.util.Collections.emptyList(); + + private void ensureAnnotationSpecSetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + annotationSpecSets_ = + new java.util.ArrayList( + annotationSpecSets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder> + annotationSpecSetsBuilder_; + + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public java.util.List + getAnnotationSpecSetsList() { + if (annotationSpecSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotationSpecSets_); + } else { + return annotationSpecSetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public int getAnnotationSpecSetsCount() { + if (annotationSpecSetsBuilder_ == null) { + return annotationSpecSets_.size(); + } else { + return annotationSpecSetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet getAnnotationSpecSets( + int index) { + if (annotationSpecSetsBuilder_ == null) { + return annotationSpecSets_.get(index); + } else { + return annotationSpecSetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public Builder setAnnotationSpecSets( + int index, com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet value) { + if (annotationSpecSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.set(index, value); + onChanged(); + } else { + annotationSpecSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public Builder setAnnotationSpecSets( + int index, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder builderForValue) { + if (annotationSpecSetsBuilder_ == null) { + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.set(index, builderForValue.build()); + onChanged(); + } else { + annotationSpecSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public Builder addAnnotationSpecSets( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet value) { + if (annotationSpecSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.add(value); + onChanged(); + } else { + annotationSpecSetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public Builder addAnnotationSpecSets( + int index, com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet value) { + if (annotationSpecSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.add(index, value); + onChanged(); + } else { + annotationSpecSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public Builder addAnnotationSpecSets( + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder builderForValue) { + if (annotationSpecSetsBuilder_ == null) { + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.add(builderForValue.build()); + onChanged(); + } else { + annotationSpecSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public Builder addAnnotationSpecSets( + int index, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder builderForValue) { + if (annotationSpecSetsBuilder_ == null) { + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationSpecSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public Builder addAllAnnotationSpecSets( + java.lang.Iterable + values) { + if (annotationSpecSetsBuilder_ == null) { + ensureAnnotationSpecSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationSpecSets_); + onChanged(); + } else { + annotationSpecSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public Builder clearAnnotationSpecSets() { + if (annotationSpecSetsBuilder_ == null) { + annotationSpecSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + annotationSpecSetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public Builder removeAnnotationSpecSets(int index) { + if (annotationSpecSetsBuilder_ == null) { + ensureAnnotationSpecSetsIsMutable(); + annotationSpecSets_.remove(index); + onChanged(); + } else { + annotationSpecSetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder + getAnnotationSpecSetsBuilder(int index) { + return getAnnotationSpecSetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder + getAnnotationSpecSetsOrBuilder(int index) { + if (annotationSpecSetsBuilder_ == null) { + return annotationSpecSets_.get(index); + } else { + return annotationSpecSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder> + getAnnotationSpecSetsOrBuilderList() { + if (annotationSpecSetsBuilder_ != null) { + return annotationSpecSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotationSpecSets_); + } + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder + addAnnotationSpecSetsBuilder() { + return getAnnotationSpecSetsFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.getDefaultInstance()); + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder + addAnnotationSpecSetsBuilder(int index) { + return getAnnotationSpecSetsFieldBuilder() + .addBuilder( + index, com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.getDefaultInstance()); + } + /** + * + * + *
+     * The list of annotation spec sets.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + public java.util.List + getAnnotationSpecSetsBuilderList() { + return getAnnotationSpecSetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder> + getAnnotationSpecSetsFieldBuilder() { + if (annotationSpecSetsBuilder_ == null) { + annotationSpecSetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder>( + annotationSpecSets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + annotationSpecSets_ = null; + } + return annotationSpecSetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse) + private static final com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnnotationSpecSetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAnnotationSpecSetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsResponseOrBuilder.java new file mode 100644 index 000000000000..610505702046 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListAnnotationSpecSetsResponseOrBuilder.java @@ -0,0 +1,90 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListAnnotationSpecSetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of annotation spec sets.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + java.util.List + getAnnotationSpecSetsList(); + /** + * + * + *
+   * The list of annotation spec sets.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet getAnnotationSpecSets(int index); + /** + * + * + *
+   * The list of annotation spec sets.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + int getAnnotationSpecSetsCount(); + /** + * + * + *
+   * The list of annotation spec sets.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + java.util.List + getAnnotationSpecSetsOrBuilderList(); + /** + * + * + *
+   * The list of annotation spec sets.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.AnnotationSpecSet annotation_spec_sets = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecSetOrBuilder getAnnotationSpecSetsOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsRequest.java new file mode 100644 index 000000000000..bf7e325db6ab --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsRequest.java @@ -0,0 +1,1039 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for ListDataItems.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListDataItemsRequest} + */ +public final class ListDataItemsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListDataItemsRequest) + ListDataItemsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataItemsRequest.newBuilder() to construct. + private ListDataItemsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataItemsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDataItemsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest.class, + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Name of the dataset to list data items, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the dataset to list data items, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListDataItems] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListDataItems] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest other = + (com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListDataItems.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListDataItemsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListDataItemsRequest) + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest.class, + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest build() { + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest result = + new com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Name of the dataset to list data items, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the dataset to list data items, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the dataset to list data items, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dataset to list data items, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the dataset to list data items, format:
+     * projects/{project_id}/datasets/{dataset_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListDataItems] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListDataItems] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListDataItems] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListDataItems] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListDataItems] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListDataItemsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListDataItemsRequest) + private static final com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataItemsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDataItemsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsRequestOrBuilder.java new file mode 100644 index 000000000000..a017459a8756 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsRequestOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListDataItemsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListDataItemsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the dataset to list data items, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Name of the dataset to list data items, format:
+   * projects/{project_id}/datasets/{dataset_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListDataItems] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListDataItems] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsResponse.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsResponse.java new file mode 100644 index 000000000000..f149682a2527 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsResponse.java @@ -0,0 +1,1092 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Results of listing data items in a dataset.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListDataItemsResponse} + */ +public final class ListDataItemsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListDataItemsResponse) + ListDataItemsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataItemsResponse.newBuilder() to construct. + private ListDataItemsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataItemsResponse() { + dataItems_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDataItemsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dataItems_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dataItems_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.DataItem.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dataItems_ = java.util.Collections.unmodifiableList(dataItems_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse.class, + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse.Builder.class); + } + + private int bitField0_; + public static final int DATA_ITEMS_FIELD_NUMBER = 1; + private java.util.List dataItems_; + /** + * + * + *
+   * The list of data items to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public java.util.List getDataItemsList() { + return dataItems_; + } + /** + * + * + *
+   * The list of data items to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public java.util.List + getDataItemsOrBuilderList() { + return dataItems_; + } + /** + * + * + *
+   * The list of data items to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public int getDataItemsCount() { + return dataItems_.size(); + } + /** + * + * + *
+   * The list of data items to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public com.google.cloud.datalabeling.v1beta1.DataItem getDataItems(int index) { + return dataItems_.get(index); + } + /** + * + * + *
+   * The list of data items to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public com.google.cloud.datalabeling.v1beta1.DataItemOrBuilder getDataItemsOrBuilder(int index) { + return dataItems_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < dataItems_.size(); i++) { + output.writeMessage(1, dataItems_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataItems_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataItems_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse other = + (com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse) obj; + + if (!getDataItemsList().equals(other.getDataItemsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDataItemsCount() > 0) { + hash = (37 * hash) + DATA_ITEMS_FIELD_NUMBER; + hash = (53 * hash) + getDataItemsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Results of listing data items in a dataset.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListDataItemsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListDataItemsResponse) + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse.class, + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDataItemsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (dataItemsBuilder_ == null) { + dataItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dataItemsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDataItemsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse build() { + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse result = + new com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (dataItemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataItems_ = java.util.Collections.unmodifiableList(dataItems_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataItems_ = dataItems_; + } else { + result.dataItems_ = dataItemsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse other) { + if (other == com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse.getDefaultInstance()) + return this; + if (dataItemsBuilder_ == null) { + if (!other.dataItems_.isEmpty()) { + if (dataItems_.isEmpty()) { + dataItems_ = other.dataItems_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataItemsIsMutable(); + dataItems_.addAll(other.dataItems_); + } + onChanged(); + } + } else { + if (!other.dataItems_.isEmpty()) { + if (dataItemsBuilder_.isEmpty()) { + dataItemsBuilder_.dispose(); + dataItemsBuilder_ = null; + dataItems_ = other.dataItems_; + bitField0_ = (bitField0_ & ~0x00000001); + dataItemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataItemsFieldBuilder() + : null; + } else { + dataItemsBuilder_.addAllMessages(other.dataItems_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List dataItems_ = + java.util.Collections.emptyList(); + + private void ensureDataItemsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataItems_ = + new java.util.ArrayList(dataItems_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.DataItem, + com.google.cloud.datalabeling.v1beta1.DataItem.Builder, + com.google.cloud.datalabeling.v1beta1.DataItemOrBuilder> + dataItemsBuilder_; + + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public java.util.List getDataItemsList() { + if (dataItemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataItems_); + } else { + return dataItemsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public int getDataItemsCount() { + if (dataItemsBuilder_ == null) { + return dataItems_.size(); + } else { + return dataItemsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public com.google.cloud.datalabeling.v1beta1.DataItem getDataItems(int index) { + if (dataItemsBuilder_ == null) { + return dataItems_.get(index); + } else { + return dataItemsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public Builder setDataItems(int index, com.google.cloud.datalabeling.v1beta1.DataItem value) { + if (dataItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataItemsIsMutable(); + dataItems_.set(index, value); + onChanged(); + } else { + dataItemsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public Builder setDataItems( + int index, com.google.cloud.datalabeling.v1beta1.DataItem.Builder builderForValue) { + if (dataItemsBuilder_ == null) { + ensureDataItemsIsMutable(); + dataItems_.set(index, builderForValue.build()); + onChanged(); + } else { + dataItemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public Builder addDataItems(com.google.cloud.datalabeling.v1beta1.DataItem value) { + if (dataItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataItemsIsMutable(); + dataItems_.add(value); + onChanged(); + } else { + dataItemsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public Builder addDataItems(int index, com.google.cloud.datalabeling.v1beta1.DataItem value) { + if (dataItemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataItemsIsMutable(); + dataItems_.add(index, value); + onChanged(); + } else { + dataItemsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public Builder addDataItems( + com.google.cloud.datalabeling.v1beta1.DataItem.Builder builderForValue) { + if (dataItemsBuilder_ == null) { + ensureDataItemsIsMutable(); + dataItems_.add(builderForValue.build()); + onChanged(); + } else { + dataItemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public Builder addDataItems( + int index, com.google.cloud.datalabeling.v1beta1.DataItem.Builder builderForValue) { + if (dataItemsBuilder_ == null) { + ensureDataItemsIsMutable(); + dataItems_.add(index, builderForValue.build()); + onChanged(); + } else { + dataItemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public Builder addAllDataItems( + java.lang.Iterable values) { + if (dataItemsBuilder_ == null) { + ensureDataItemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataItems_); + onChanged(); + } else { + dataItemsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public Builder clearDataItems() { + if (dataItemsBuilder_ == null) { + dataItems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataItemsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public Builder removeDataItems(int index) { + if (dataItemsBuilder_ == null) { + ensureDataItemsIsMutable(); + dataItems_.remove(index); + onChanged(); + } else { + dataItemsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public com.google.cloud.datalabeling.v1beta1.DataItem.Builder getDataItemsBuilder(int index) { + return getDataItemsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public com.google.cloud.datalabeling.v1beta1.DataItemOrBuilder getDataItemsOrBuilder( + int index) { + if (dataItemsBuilder_ == null) { + return dataItems_.get(index); + } else { + return dataItemsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public java.util.List + getDataItemsOrBuilderList() { + if (dataItemsBuilder_ != null) { + return dataItemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataItems_); + } + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public com.google.cloud.datalabeling.v1beta1.DataItem.Builder addDataItemsBuilder() { + return getDataItemsFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.DataItem.getDefaultInstance()); + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public com.google.cloud.datalabeling.v1beta1.DataItem.Builder addDataItemsBuilder(int index) { + return getDataItemsFieldBuilder() + .addBuilder(index, com.google.cloud.datalabeling.v1beta1.DataItem.getDefaultInstance()); + } + /** + * + * + *
+     * The list of data items to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + public java.util.List + getDataItemsBuilderList() { + return getDataItemsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.DataItem, + com.google.cloud.datalabeling.v1beta1.DataItem.Builder, + com.google.cloud.datalabeling.v1beta1.DataItemOrBuilder> + getDataItemsFieldBuilder() { + if (dataItemsBuilder_ == null) { + dataItemsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.DataItem, + com.google.cloud.datalabeling.v1beta1.DataItem.Builder, + com.google.cloud.datalabeling.v1beta1.DataItemOrBuilder>( + dataItems_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + dataItems_ = null; + } + return dataItemsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListDataItemsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListDataItemsResponse) + private static final com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataItemsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDataItemsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsResponseOrBuilder.java new file mode 100644 index 000000000000..3be22a33de75 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDataItemsResponseOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListDataItemsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListDataItemsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of data items to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + java.util.List getDataItemsList(); + /** + * + * + *
+   * The list of data items to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + com.google.cloud.datalabeling.v1beta1.DataItem getDataItems(int index); + /** + * + * + *
+   * The list of data items to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + int getDataItemsCount(); + /** + * + * + *
+   * The list of data items to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + java.util.List + getDataItemsOrBuilderList(); + /** + * + * + *
+   * The list of data items to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.DataItem data_items = 1; + */ + com.google.cloud.datalabeling.v1beta1.DataItemOrBuilder getDataItemsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsRequest.java new file mode 100644 index 000000000000..867b70573556 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsRequest.java @@ -0,0 +1,1039 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for ListDataset.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListDatasetsRequest} + */ +public final class ListDatasetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListDatasetsRequest) + ListDatasetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDatasetsRequest.newBuilder() to construct. + private ListDatasetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDatasetsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDatasetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest.class, + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Dataset resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Dataset resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Filter on dataset is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter on dataset is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListDatasets] call.
+   * Returns the first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListDatasets] call.
+   * Returns the first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest other = + (com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListDataset.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListDatasetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListDatasetsRequest) + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest.class, + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest build() { + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest result = + new com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Dataset resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Dataset resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Dataset resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter on dataset is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter on dataset is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter on dataset is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter on dataset is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter on dataset is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListDatasets] call.
+     * Returns the first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListDatasets] call.
+     * Returns the first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListDatasets] call.
+     * Returns the first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListDatasets] call.
+     * Returns the first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListDatasets] call.
+     * Returns the first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListDatasetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListDatasetsRequest) + private static final com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDatasetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDatasetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsRequestOrBuilder.java new file mode 100644 index 000000000000..ded39a446677 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsRequestOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListDatasetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListDatasetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Dataset resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Dataset resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Filter on dataset is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter on dataset is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListDatasets] call.
+   * Returns the first page if empty.
+   * 
+ * + * string page_token = 4; + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListDatasets] call.
+   * Returns the first page if empty.
+   * 
+ * + * string page_token = 4; + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsResponse.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsResponse.java new file mode 100644 index 000000000000..363bef714177 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsResponse.java @@ -0,0 +1,1091 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Results of listing datasets within a project.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListDatasetsResponse} + */ +public final class ListDatasetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListDatasetsResponse) + ListDatasetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDatasetsResponse.newBuilder() to construct. + private ListDatasetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDatasetsResponse() { + datasets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListDatasetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + datasets_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + datasets_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.Dataset.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + datasets_ = java.util.Collections.unmodifiableList(datasets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse.class, + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse.Builder.class); + } + + private int bitField0_; + public static final int DATASETS_FIELD_NUMBER = 1; + private java.util.List datasets_; + /** + * + * + *
+   * The list of datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public java.util.List getDatasetsList() { + return datasets_; + } + /** + * + * + *
+   * The list of datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public java.util.List + getDatasetsOrBuilderList() { + return datasets_; + } + /** + * + * + *
+   * The list of datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public int getDatasetsCount() { + return datasets_.size(); + } + /** + * + * + *
+   * The list of datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Dataset getDatasets(int index) { + return datasets_.get(index); + } + /** + * + * + *
+   * The list of datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder getDatasetsOrBuilder(int index) { + return datasets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < datasets_.size(); i++) { + output.writeMessage(1, datasets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < datasets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, datasets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse other = + (com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse) obj; + + if (!getDatasetsList().equals(other.getDatasetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDatasetsCount() > 0) { + hash = (37 * hash) + DATASETS_FIELD_NUMBER; + hash = (53 * hash) + getDatasetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Results of listing datasets within a project.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListDatasetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListDatasetsResponse) + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse.class, + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDatasetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (datasetsBuilder_ == null) { + datasets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + datasetsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListDatasetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse build() { + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse result = + new com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (datasetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + datasets_ = java.util.Collections.unmodifiableList(datasets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.datasets_ = datasets_; + } else { + result.datasets_ = datasetsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse other) { + if (other == com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse.getDefaultInstance()) + return this; + if (datasetsBuilder_ == null) { + if (!other.datasets_.isEmpty()) { + if (datasets_.isEmpty()) { + datasets_ = other.datasets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDatasetsIsMutable(); + datasets_.addAll(other.datasets_); + } + onChanged(); + } + } else { + if (!other.datasets_.isEmpty()) { + if (datasetsBuilder_.isEmpty()) { + datasetsBuilder_.dispose(); + datasetsBuilder_ = null; + datasets_ = other.datasets_; + bitField0_ = (bitField0_ & ~0x00000001); + datasetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDatasetsFieldBuilder() + : null; + } else { + datasetsBuilder_.addAllMessages(other.datasets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List datasets_ = + java.util.Collections.emptyList(); + + private void ensureDatasetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + datasets_ = + new java.util.ArrayList(datasets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Dataset, + com.google.cloud.datalabeling.v1beta1.Dataset.Builder, + com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder> + datasetsBuilder_; + + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public java.util.List getDatasetsList() { + if (datasetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(datasets_); + } else { + return datasetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public int getDatasetsCount() { + if (datasetsBuilder_ == null) { + return datasets_.size(); + } else { + return datasetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Dataset getDatasets(int index) { + if (datasetsBuilder_ == null) { + return datasets_.get(index); + } else { + return datasetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public Builder setDatasets(int index, com.google.cloud.datalabeling.v1beta1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.set(index, value); + onChanged(); + } else { + datasetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public Builder setDatasets( + int index, com.google.cloud.datalabeling.v1beta1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.set(index, builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public Builder addDatasets(com.google.cloud.datalabeling.v1beta1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.add(value); + onChanged(); + } else { + datasetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public Builder addDatasets(int index, com.google.cloud.datalabeling.v1beta1.Dataset value) { + if (datasetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDatasetsIsMutable(); + datasets_.add(index, value); + onChanged(); + } else { + datasetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public Builder addDatasets( + com.google.cloud.datalabeling.v1beta1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.add(builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public Builder addDatasets( + int index, com.google.cloud.datalabeling.v1beta1.Dataset.Builder builderForValue) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.add(index, builderForValue.build()); + onChanged(); + } else { + datasetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public Builder addAllDatasets( + java.lang.Iterable values) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datasets_); + onChanged(); + } else { + datasetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public Builder clearDatasets() { + if (datasetsBuilder_ == null) { + datasets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + datasetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public Builder removeDatasets(int index) { + if (datasetsBuilder_ == null) { + ensureDatasetsIsMutable(); + datasets_.remove(index); + onChanged(); + } else { + datasetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Dataset.Builder getDatasetsBuilder(int index) { + return getDatasetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder getDatasetsOrBuilder(int index) { + if (datasetsBuilder_ == null) { + return datasets_.get(index); + } else { + return datasetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public java.util.List + getDatasetsOrBuilderList() { + if (datasetsBuilder_ != null) { + return datasetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(datasets_); + } + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Dataset.Builder addDatasetsBuilder() { + return getDatasetsFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.Dataset.getDefaultInstance()); + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Dataset.Builder addDatasetsBuilder(int index) { + return getDatasetsFieldBuilder() + .addBuilder(index, com.google.cloud.datalabeling.v1beta1.Dataset.getDefaultInstance()); + } + /** + * + * + *
+     * The list of datasets to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + public java.util.List + getDatasetsBuilderList() { + return getDatasetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Dataset, + com.google.cloud.datalabeling.v1beta1.Dataset.Builder, + com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder> + getDatasetsFieldBuilder() { + if (datasetsBuilder_ == null) { + datasetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Dataset, + com.google.cloud.datalabeling.v1beta1.Dataset.Builder, + com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder>( + datasets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + datasets_ = null; + } + return datasetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListDatasetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListDatasetsResponse) + private static final com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDatasetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListDatasetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsResponseOrBuilder.java new file mode 100644 index 000000000000..c582d1cfb062 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListDatasetsResponseOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListDatasetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListDatasetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + java.util.List getDatasetsList(); + /** + * + * + *
+   * The list of datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + com.google.cloud.datalabeling.v1beta1.Dataset getDatasets(int index); + /** + * + * + *
+   * The list of datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + int getDatasetsCount(); + /** + * + * + *
+   * The list of datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + java.util.List + getDatasetsOrBuilderList(); + /** + * + * + *
+   * The list of datasets to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Dataset datasets = 1; + */ + com.google.cloud.datalabeling.v1beta1.DatasetOrBuilder getDatasetsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesRequest.java new file mode 100644 index 000000000000..7d9b4d5e5ca8 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesRequest.java @@ -0,0 +1,1053 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for ListExamples.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListExamplesRequest} + */ +public final class ListExamplesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListExamplesRequest) + ListExamplesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListExamplesRequest.newBuilder() to construct. + private ListExamplesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExamplesRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListExamplesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListExamplesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListExamplesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest.class, + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Example resource parent.
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Example resource parent.
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. An expression for filtering Examples. For annotated datasets that
+   * have annotation spec set, filter by
+   * annotation_spec.display_name is supported. Format
+   * "annotation_spec.display_name = {display_name}"
+   * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An expression for filtering Examples. For annotated datasets that
+   * have annotation spec set, filter by
+   * annotation_spec.display_name is supported. Format
+   * "annotation_spec.display_name = {display_name}"
+   * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous
+   * [DataLabelingService.ListExamples] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous
+   * [DataLabelingService.ListExamples] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListExamplesRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest other = + (com.google.cloud.datalabeling.v1beta1.ListExamplesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListExamples.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListExamplesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListExamplesRequest) + com.google.cloud.datalabeling.v1beta1.ListExamplesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListExamplesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListExamplesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest.class, + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ListExamplesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListExamplesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListExamplesRequest getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListExamplesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListExamplesRequest build() { + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListExamplesRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest result = + new com.google.cloud.datalabeling.v1beta1.ListExamplesRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListExamplesRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ListExamplesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ListExamplesRequest other) { + if (other == com.google.cloud.datalabeling.v1beta1.ListExamplesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListExamplesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListExamplesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Example resource parent.
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Example resource parent.
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Example resource parent.
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example resource parent.
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Example resource parent.
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. An expression for filtering Examples. For annotated datasets that
+     * have annotation spec set, filter by
+     * annotation_spec.display_name is supported. Format
+     * "annotation_spec.display_name = {display_name}"
+     * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering Examples. For annotated datasets that
+     * have annotation spec set, filter by
+     * annotation_spec.display_name is supported. Format
+     * "annotation_spec.display_name = {display_name}"
+     * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering Examples. For annotated datasets that
+     * have annotation spec set, filter by
+     * annotation_spec.display_name is supported. Format
+     * "annotation_spec.display_name = {display_name}"
+     * 
+ * + * string filter = 2; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering Examples. For annotated datasets that
+     * have annotation spec set, filter by
+     * annotation_spec.display_name is supported. Format
+     * "annotation_spec.display_name = {display_name}"
+     * 
+ * + * string filter = 2; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering Examples. For annotated datasets that
+     * have annotation spec set, filter by
+     * annotation_spec.display_name is supported. Format
+     * "annotation_spec.display_name = {display_name}"
+     * 
+ * + * string filter = 2; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous
+     * [DataLabelingService.ListExamples] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous
+     * [DataLabelingService.ListExamples] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous
+     * [DataLabelingService.ListExamples] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous
+     * [DataLabelingService.ListExamples] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous
+     * [DataLabelingService.ListExamples] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListExamplesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListExamplesRequest) + private static final com.google.cloud.datalabeling.v1beta1.ListExamplesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListExamplesRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExamplesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListExamplesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListExamplesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesRequestOrBuilder.java new file mode 100644 index 000000000000..e6ad0a96b8bd --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesRequestOrBuilder.java @@ -0,0 +1,99 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListExamplesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListExamplesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Example resource parent.
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Example resource parent.
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. An expression for filtering Examples. For annotated datasets that
+   * have annotation spec set, filter by
+   * annotation_spec.display_name is supported. Format
+   * "annotation_spec.display_name = {display_name}"
+   * 
+ * + * string filter = 2; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. An expression for filtering Examples. For annotated datasets that
+   * have annotation spec set, filter by
+   * annotation_spec.display_name is supported. Format
+   * "annotation_spec.display_name = {display_name}"
+   * 
+ * + * string filter = 2; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous
+   * [DataLabelingService.ListExamples] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous
+   * [DataLabelingService.ListExamples] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesResponse.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesResponse.java new file mode 100644 index 000000000000..29512aeb13de --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesResponse.java @@ -0,0 +1,1091 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Results of listing Examples in and annotated dataset.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListExamplesResponse} + */ +public final class ListExamplesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListExamplesResponse) + ListExamplesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListExamplesResponse.newBuilder() to construct. + private ListExamplesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListExamplesResponse() { + examples_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListExamplesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + examples_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + examples_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.Example.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + examples_ = java.util.Collections.unmodifiableList(examples_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListExamplesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListExamplesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse.class, + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse.Builder.class); + } + + private int bitField0_; + public static final int EXAMPLES_FIELD_NUMBER = 1; + private java.util.List examples_; + /** + * + * + *
+   * The list of examples to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public java.util.List getExamplesList() { + return examples_; + } + /** + * + * + *
+   * The list of examples to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public java.util.List + getExamplesOrBuilderList() { + return examples_; + } + /** + * + * + *
+   * The list of examples to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public int getExamplesCount() { + return examples_.size(); + } + /** + * + * + *
+   * The list of examples to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Example getExamples(int index) { + return examples_.get(index); + } + /** + * + * + *
+   * The list of examples to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public com.google.cloud.datalabeling.v1beta1.ExampleOrBuilder getExamplesOrBuilder(int index) { + return examples_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < examples_.size(); i++) { + output.writeMessage(1, examples_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < examples_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, examples_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListExamplesResponse)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse other = + (com.google.cloud.datalabeling.v1beta1.ListExamplesResponse) obj; + + if (!getExamplesList().equals(other.getExamplesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getExamplesCount() > 0) { + hash = (37 * hash) + EXAMPLES_FIELD_NUMBER; + hash = (53 * hash) + getExamplesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Results of listing Examples in and annotated dataset.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListExamplesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListExamplesResponse) + com.google.cloud.datalabeling.v1beta1.ListExamplesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListExamplesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListExamplesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse.class, + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ListExamplesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExamplesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (examplesBuilder_ == null) { + examples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + examplesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListExamplesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListExamplesResponse getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListExamplesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListExamplesResponse build() { + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListExamplesResponse buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse result = + new com.google.cloud.datalabeling.v1beta1.ListExamplesResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (examplesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + examples_ = java.util.Collections.unmodifiableList(examples_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.examples_ = examples_; + } else { + result.examples_ = examplesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListExamplesResponse) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ListExamplesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ListExamplesResponse other) { + if (other == com.google.cloud.datalabeling.v1beta1.ListExamplesResponse.getDefaultInstance()) + return this; + if (examplesBuilder_ == null) { + if (!other.examples_.isEmpty()) { + if (examples_.isEmpty()) { + examples_ = other.examples_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureExamplesIsMutable(); + examples_.addAll(other.examples_); + } + onChanged(); + } + } else { + if (!other.examples_.isEmpty()) { + if (examplesBuilder_.isEmpty()) { + examplesBuilder_.dispose(); + examplesBuilder_ = null; + examples_ = other.examples_; + bitField0_ = (bitField0_ & ~0x00000001); + examplesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getExamplesFieldBuilder() + : null; + } else { + examplesBuilder_.addAllMessages(other.examples_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListExamplesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListExamplesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List examples_ = + java.util.Collections.emptyList(); + + private void ensureExamplesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + examples_ = + new java.util.ArrayList(examples_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Example, + com.google.cloud.datalabeling.v1beta1.Example.Builder, + com.google.cloud.datalabeling.v1beta1.ExampleOrBuilder> + examplesBuilder_; + + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public java.util.List getExamplesList() { + if (examplesBuilder_ == null) { + return java.util.Collections.unmodifiableList(examples_); + } else { + return examplesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public int getExamplesCount() { + if (examplesBuilder_ == null) { + return examples_.size(); + } else { + return examplesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Example getExamples(int index) { + if (examplesBuilder_ == null) { + return examples_.get(index); + } else { + return examplesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public Builder setExamples(int index, com.google.cloud.datalabeling.v1beta1.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.set(index, value); + onChanged(); + } else { + examplesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public Builder setExamples( + int index, com.google.cloud.datalabeling.v1beta1.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.set(index, builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public Builder addExamples(com.google.cloud.datalabeling.v1beta1.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.add(value); + onChanged(); + } else { + examplesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public Builder addExamples(int index, com.google.cloud.datalabeling.v1beta1.Example value) { + if (examplesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureExamplesIsMutable(); + examples_.add(index, value); + onChanged(); + } else { + examplesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public Builder addExamples( + com.google.cloud.datalabeling.v1beta1.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public Builder addExamples( + int index, com.google.cloud.datalabeling.v1beta1.Example.Builder builderForValue) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.add(index, builderForValue.build()); + onChanged(); + } else { + examplesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public Builder addAllExamples( + java.lang.Iterable values) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, examples_); + onChanged(); + } else { + examplesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public Builder clearExamples() { + if (examplesBuilder_ == null) { + examples_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + examplesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public Builder removeExamples(int index) { + if (examplesBuilder_ == null) { + ensureExamplesIsMutable(); + examples_.remove(index); + onChanged(); + } else { + examplesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Example.Builder getExamplesBuilder(int index) { + return getExamplesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public com.google.cloud.datalabeling.v1beta1.ExampleOrBuilder getExamplesOrBuilder(int index) { + if (examplesBuilder_ == null) { + return examples_.get(index); + } else { + return examplesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public java.util.List + getExamplesOrBuilderList() { + if (examplesBuilder_ != null) { + return examplesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(examples_); + } + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Example.Builder addExamplesBuilder() { + return getExamplesFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.Example.getDefaultInstance()); + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Example.Builder addExamplesBuilder(int index) { + return getExamplesFieldBuilder() + .addBuilder(index, com.google.cloud.datalabeling.v1beta1.Example.getDefaultInstance()); + } + /** + * + * + *
+     * The list of examples to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + public java.util.List + getExamplesBuilderList() { + return getExamplesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Example, + com.google.cloud.datalabeling.v1beta1.Example.Builder, + com.google.cloud.datalabeling.v1beta1.ExampleOrBuilder> + getExamplesFieldBuilder() { + if (examplesBuilder_ == null) { + examplesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Example, + com.google.cloud.datalabeling.v1beta1.Example.Builder, + com.google.cloud.datalabeling.v1beta1.ExampleOrBuilder>( + examples_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + examples_ = null; + } + return examplesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListExamplesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListExamplesResponse) + private static final com.google.cloud.datalabeling.v1beta1.ListExamplesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListExamplesResponse(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListExamplesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListExamplesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListExamplesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListExamplesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesResponseOrBuilder.java new file mode 100644 index 000000000000..e5965408f347 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListExamplesResponseOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListExamplesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListExamplesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of examples to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + java.util.List getExamplesList(); + /** + * + * + *
+   * The list of examples to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + com.google.cloud.datalabeling.v1beta1.Example getExamples(int index); + /** + * + * + *
+   * The list of examples to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + int getExamplesCount(); + /** + * + * + *
+   * The list of examples to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + java.util.List + getExamplesOrBuilderList(); + /** + * + * + *
+   * The list of examples to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Example examples = 1; + */ + com.google.cloud.datalabeling.v1beta1.ExampleOrBuilder getExamplesOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsRequest.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsRequest.java new file mode 100644 index 000000000000..ca4249310d82 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsRequest.java @@ -0,0 +1,1043 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Request message for ListInstructions.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListInstructionsRequest} + */ +public final class ListInstructionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListInstructionsRequest) + ListInstructionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstructionsRequest.newBuilder() to construct. + private ListInstructionsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstructionsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstructionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest.class, + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. Instruction resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Instruction resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListInstructions] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListInstructions] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest other = + (com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListInstructions.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListInstructionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListInstructionsRequest) + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest.class, + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest build() { + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest result = + new com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Instruction resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Instruction resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Instruction resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instruction resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Instruction resource parent, format:
+     * projects/{project_id}
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter is not supported at this moment.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server may return fewer results than
+     * requested. Default value is 100.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListInstructions] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListInstructions] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListInstructions] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListInstructions] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results for the server to return.
+     * Typically obtained by
+     * [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous
+     * [DataLabelingService.ListInstructions] call.
+     * Return first page if empty.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListInstructionsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListInstructionsRequest) + private static final com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstructionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstructionsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsRequestOrBuilder.java new file mode 100644 index 000000000000..e3cc698bf4d2 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsRequestOrBuilder.java @@ -0,0 +1,95 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListInstructionsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListInstructionsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Instruction resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Instruction resource parent, format:
+   * projects/{project_id}
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter is not supported at this moment.
+   * 
+ * + * string filter = 2; + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server may return fewer results than
+   * requested. Default value is 100.
+   * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListInstructions] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results for the server to return.
+   * Typically obtained by
+   * [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous
+   * [DataLabelingService.ListInstructions] call.
+   * Return first page if empty.
+   * 
+ * + * string page_token = 4; + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsResponse.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsResponse.java new file mode 100644 index 000000000000..7a883f901df3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsResponse.java @@ -0,0 +1,1106 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Results of listing instructions under a project.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListInstructionsResponse} + */ +public final class ListInstructionsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ListInstructionsResponse) + ListInstructionsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListInstructionsResponse.newBuilder() to construct. + private ListInstructionsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListInstructionsResponse() { + instructions_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListInstructionsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + instructions_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + instructions_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.Instruction.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + instructions_ = java.util.Collections.unmodifiableList(instructions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse.class, + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse.Builder.class); + } + + private int bitField0_; + public static final int INSTRUCTIONS_FIELD_NUMBER = 1; + private java.util.List instructions_; + /** + * + * + *
+   * The list of Instructions to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public java.util.List getInstructionsList() { + return instructions_; + } + /** + * + * + *
+   * The list of Instructions to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public java.util.List + getInstructionsOrBuilderList() { + return instructions_; + } + /** + * + * + *
+   * The list of Instructions to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public int getInstructionsCount() { + return instructions_.size(); + } + /** + * + * + *
+   * The list of Instructions to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Instruction getInstructions(int index) { + return instructions_.get(index); + } + /** + * + * + *
+   * The list of Instructions to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder getInstructionsOrBuilder( + int index) { + return instructions_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < instructions_.size(); i++) { + output.writeMessage(1, instructions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < instructions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, instructions_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse other = + (com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse) obj; + + if (!getInstructionsList().equals(other.getInstructionsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInstructionsCount() > 0) { + hash = (37 * hash) + INSTRUCTIONS_FIELD_NUMBER; + hash = (53 * hash) + getInstructionsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Results of listing instructions under a project.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ListInstructionsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ListInstructionsResponse) + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse.class, + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstructionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (instructionsBuilder_ == null) { + instructions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + instructionsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DataLabelingServiceOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ListInstructionsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse build() { + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse buildPartial() { + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse result = + new com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (instructionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + instructions_ = java.util.Collections.unmodifiableList(instructions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.instructions_ = instructions_; + } else { + result.instructions_ = instructionsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse other) { + if (other + == com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse.getDefaultInstance()) + return this; + if (instructionsBuilder_ == null) { + if (!other.instructions_.isEmpty()) { + if (instructions_.isEmpty()) { + instructions_ = other.instructions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstructionsIsMutable(); + instructions_.addAll(other.instructions_); + } + onChanged(); + } + } else { + if (!other.instructions_.isEmpty()) { + if (instructionsBuilder_.isEmpty()) { + instructionsBuilder_.dispose(); + instructionsBuilder_ = null; + instructions_ = other.instructions_; + bitField0_ = (bitField0_ & ~0x00000001); + instructionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInstructionsFieldBuilder() + : null; + } else { + instructionsBuilder_.addAllMessages(other.instructions_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List instructions_ = + java.util.Collections.emptyList(); + + private void ensureInstructionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + instructions_ = + new java.util.ArrayList( + instructions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Instruction, + com.google.cloud.datalabeling.v1beta1.Instruction.Builder, + com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder> + instructionsBuilder_; + + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public java.util.List getInstructionsList() { + if (instructionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(instructions_); + } else { + return instructionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public int getInstructionsCount() { + if (instructionsBuilder_ == null) { + return instructions_.size(); + } else { + return instructionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Instruction getInstructions(int index) { + if (instructionsBuilder_ == null) { + return instructions_.get(index); + } else { + return instructionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public Builder setInstructions( + int index, com.google.cloud.datalabeling.v1beta1.Instruction value) { + if (instructionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstructionsIsMutable(); + instructions_.set(index, value); + onChanged(); + } else { + instructionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public Builder setInstructions( + int index, com.google.cloud.datalabeling.v1beta1.Instruction.Builder builderForValue) { + if (instructionsBuilder_ == null) { + ensureInstructionsIsMutable(); + instructions_.set(index, builderForValue.build()); + onChanged(); + } else { + instructionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public Builder addInstructions(com.google.cloud.datalabeling.v1beta1.Instruction value) { + if (instructionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstructionsIsMutable(); + instructions_.add(value); + onChanged(); + } else { + instructionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public Builder addInstructions( + int index, com.google.cloud.datalabeling.v1beta1.Instruction value) { + if (instructionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstructionsIsMutable(); + instructions_.add(index, value); + onChanged(); + } else { + instructionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public Builder addInstructions( + com.google.cloud.datalabeling.v1beta1.Instruction.Builder builderForValue) { + if (instructionsBuilder_ == null) { + ensureInstructionsIsMutable(); + instructions_.add(builderForValue.build()); + onChanged(); + } else { + instructionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public Builder addInstructions( + int index, com.google.cloud.datalabeling.v1beta1.Instruction.Builder builderForValue) { + if (instructionsBuilder_ == null) { + ensureInstructionsIsMutable(); + instructions_.add(index, builderForValue.build()); + onChanged(); + } else { + instructionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public Builder addAllInstructions( + java.lang.Iterable values) { + if (instructionsBuilder_ == null) { + ensureInstructionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instructions_); + onChanged(); + } else { + instructionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public Builder clearInstructions() { + if (instructionsBuilder_ == null) { + instructions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + instructionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public Builder removeInstructions(int index) { + if (instructionsBuilder_ == null) { + ensureInstructionsIsMutable(); + instructions_.remove(index); + onChanged(); + } else { + instructionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Instruction.Builder getInstructionsBuilder( + int index) { + return getInstructionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder getInstructionsOrBuilder( + int index) { + if (instructionsBuilder_ == null) { + return instructions_.get(index); + } else { + return instructionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public java.util.List + getInstructionsOrBuilderList() { + if (instructionsBuilder_ != null) { + return instructionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(instructions_); + } + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Instruction.Builder addInstructionsBuilder() { + return getInstructionsFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.Instruction.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Instruction.Builder addInstructionsBuilder( + int index) { + return getInstructionsFieldBuilder() + .addBuilder( + index, com.google.cloud.datalabeling.v1beta1.Instruction.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Instructions to return.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + public java.util.List + getInstructionsBuilderList() { + return getInstructionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Instruction, + com.google.cloud.datalabeling.v1beta1.Instruction.Builder, + com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder> + getInstructionsFieldBuilder() { + if (instructionsBuilder_ == null) { + instructionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Instruction, + com.google.cloud.datalabeling.v1beta1.Instruction.Builder, + com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder>( + instructions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + instructions_ = null; + } + return instructionsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve next page of results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ListInstructionsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ListInstructionsResponse) + private static final com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse(); + } + + public static com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListInstructionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListInstructionsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsResponseOrBuilder.java new file mode 100644 index 000000000000..2290e47fdd17 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ListInstructionsResponseOrBuilder.java @@ -0,0 +1,83 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ListInstructionsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ListInstructionsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Instructions to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + java.util.List getInstructionsList(); + /** + * + * + *
+   * The list of Instructions to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + com.google.cloud.datalabeling.v1beta1.Instruction getInstructions(int index); + /** + * + * + *
+   * The list of Instructions to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + int getInstructionsCount(); + /** + * + * + *
+   * The list of Instructions to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + java.util.List + getInstructionsOrBuilderList(); + /** + * + * + *
+   * The list of Instructions to return.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Instruction instructions = 1; + */ + com.google.cloud.datalabeling.v1beta1.InstructionOrBuilder getInstructionsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve next page of results.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedBoundingPoly.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedBoundingPoly.java new file mode 100644 index 000000000000..917299376ce2 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedBoundingPoly.java @@ -0,0 +1,973 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Normalized bounding polygon.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} + */ +public final class NormalizedBoundingPoly extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) + NormalizedBoundingPolyOrBuilder { + private static final long serialVersionUID = 0L; + // Use NormalizedBoundingPoly.newBuilder() to construct. + private NormalizedBoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NormalizedBoundingPoly() { + normalizedVertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NormalizedBoundingPoly( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = + new java.util.ArrayList< + com.google.cloud.datalabeling.v1beta1.NormalizedVertex>(); + mutable_bitField0_ |= 0x00000001; + } + normalizedVertices_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedBoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedBoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.class, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder.class); + } + + public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 1; + private java.util.List + normalizedVertices_; + /** + * + * + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public java.util.List + getNormalizedVerticesList() { + return normalizedVertices_; + } + /** + * + * + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public java.util.List + getNormalizedVerticesOrBuilderList() { + return normalizedVertices_; + } + /** + * + * + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public int getNormalizedVerticesCount() { + return normalizedVertices_.size(); + } + /** + * + * + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex getNormalizedVertices(int index) { + return normalizedVertices_.get(index); + } + /** + * + * + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder + getNormalizedVerticesOrBuilder(int index) { + return normalizedVertices_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < normalizedVertices_.size(); i++) { + output.writeMessage(1, normalizedVertices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < normalizedVertices_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, normalizedVertices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly other = + (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) obj; + + if (!getNormalizedVerticesList().equals(other.getNormalizedVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNormalizedVerticesCount() > 0) { + hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedVerticesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Normalized bounding polygon.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedBoundingPoly_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedBoundingPoly_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.class, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNormalizedVerticesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedBoundingPoly_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly build() { + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly buildPartial() { + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly result = + new com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly(this); + int from_bitField0_ = bitField0_; + if (normalizedVerticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.normalizedVertices_ = normalizedVertices_; + } else { + result.normalizedVertices_ = normalizedVerticesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly other) { + if (other + == com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance()) + return this; + if (normalizedVerticesBuilder_ == null) { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVertices_.isEmpty()) { + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.addAll(other.normalizedVertices_); + } + onChanged(); + } + } else { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVerticesBuilder_.isEmpty()) { + normalizedVerticesBuilder_.dispose(); + normalizedVerticesBuilder_ = null; + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000001); + normalizedVerticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNormalizedVerticesFieldBuilder() + : null; + } else { + normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + normalizedVertices_ = java.util.Collections.emptyList(); + + private void ensureNormalizedVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = + new java.util.ArrayList( + normalizedVertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedVertex, + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder> + normalizedVerticesBuilder_; + + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public java.util.List + getNormalizedVerticesList() { + if (normalizedVerticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } else { + return normalizedVerticesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public int getNormalizedVerticesCount() { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.size(); + } else { + return normalizedVerticesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex getNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.datalabeling.v1beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder addNormalizedVertices( + com.google.cloud.datalabeling.v1beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.datalabeling.v1beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder addNormalizedVertices( + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder addAllNormalizedVertices( + java.lang.Iterable + values) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, normalizedVertices_); + onChanged(); + } else { + normalizedVerticesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder clearNormalizedVertices() { + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder removeNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.remove(index); + onChanged(); + } else { + normalizedVerticesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder + getNormalizedVerticesBuilder(int index) { + return getNormalizedVerticesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder + getNormalizedVerticesOrBuilder(int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public java.util.List + getNormalizedVerticesOrBuilderList() { + if (normalizedVerticesBuilder_ != null) { + return normalizedVerticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder + addNormalizedVerticesBuilder() { + return getNormalizedVerticesFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.NormalizedVertex.getDefaultInstance()); + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder + addNormalizedVerticesBuilder(int index) { + return getNormalizedVerticesFieldBuilder() + .addBuilder( + index, com.google.cloud.datalabeling.v1beta1.NormalizedVertex.getDefaultInstance()); + } + /** + * + * + *
+     * The bounding polygon normalized vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public java.util.List + getNormalizedVerticesBuilderList() { + return getNormalizedVerticesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedVertex, + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder> + getNormalizedVerticesFieldBuilder() { + if (normalizedVerticesBuilder_ == null) { + normalizedVerticesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedVertex, + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder>( + normalizedVertices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + normalizedVertices_ = null; + } + return normalizedVerticesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) + private static final com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly(); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedBoundingPoly parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NormalizedBoundingPoly(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedBoundingPolyOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedBoundingPolyOrBuilder.java new file mode 100644 index 000000000000..d0f7cb9eb5e2 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedBoundingPolyOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface NormalizedBoundingPolyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + java.util.List + getNormalizedVerticesList(); + /** + * + * + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.NormalizedVertex getNormalizedVertices(int index); + /** + * + * + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + int getNormalizedVerticesCount(); + /** + * + * + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + java.util.List + getNormalizedVerticesOrBuilderList(); + /** + * + * + *
+   * The bounding polygon normalized vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedPolyline.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedPolyline.java new file mode 100644 index 000000000000..765348a399f6 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedPolyline.java @@ -0,0 +1,970 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Normalized polyline.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.NormalizedPolyline} + */ +public final class NormalizedPolyline extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.NormalizedPolyline) + NormalizedPolylineOrBuilder { + private static final long serialVersionUID = 0L; + // Use NormalizedPolyline.newBuilder() to construct. + private NormalizedPolyline(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NormalizedPolyline() { + normalizedVertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NormalizedPolyline( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = + new java.util.ArrayList< + com.google.cloud.datalabeling.v1beta1.NormalizedVertex>(); + mutable_bitField0_ |= 0x00000001; + } + normalizedVertices_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedPolyline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedPolyline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.class, + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.Builder.class); + } + + public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 1; + private java.util.List + normalizedVertices_; + /** + * + * + *
+   * The normalized polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public java.util.List + getNormalizedVerticesList() { + return normalizedVertices_; + } + /** + * + * + *
+   * The normalized polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public java.util.List + getNormalizedVerticesOrBuilderList() { + return normalizedVertices_; + } + /** + * + * + *
+   * The normalized polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public int getNormalizedVerticesCount() { + return normalizedVertices_.size(); + } + /** + * + * + *
+   * The normalized polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex getNormalizedVertices(int index) { + return normalizedVertices_.get(index); + } + /** + * + * + *
+   * The normalized polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder + getNormalizedVerticesOrBuilder(int index) { + return normalizedVertices_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < normalizedVertices_.size(); i++) { + output.writeMessage(1, normalizedVertices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < normalizedVertices_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, normalizedVertices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.NormalizedPolyline)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline other = + (com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) obj; + + if (!getNormalizedVerticesList().equals(other.getNormalizedVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getNormalizedVerticesCount() > 0) { + hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedVerticesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Normalized polyline.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.NormalizedPolyline} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.NormalizedPolyline) + com.google.cloud.datalabeling.v1beta1.NormalizedPolylineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedPolyline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedPolyline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.class, + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getNormalizedVerticesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedPolyline_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedPolyline getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedPolyline build() { + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedPolyline buildPartial() { + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline result = + new com.google.cloud.datalabeling.v1beta1.NormalizedPolyline(this); + int from_bitField0_ = bitField0_; + if (normalizedVerticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.normalizedVertices_ = normalizedVertices_; + } else { + result.normalizedVertices_ = normalizedVerticesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.NormalizedPolyline other) { + if (other == com.google.cloud.datalabeling.v1beta1.NormalizedPolyline.getDefaultInstance()) + return this; + if (normalizedVerticesBuilder_ == null) { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVertices_.isEmpty()) { + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.addAll(other.normalizedVertices_); + } + onChanged(); + } + } else { + if (!other.normalizedVertices_.isEmpty()) { + if (normalizedVerticesBuilder_.isEmpty()) { + normalizedVerticesBuilder_.dispose(); + normalizedVerticesBuilder_ = null; + normalizedVertices_ = other.normalizedVertices_; + bitField0_ = (bitField0_ & ~0x00000001); + normalizedVerticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNormalizedVerticesFieldBuilder() + : null; + } else { + normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.NormalizedPolyline parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.NormalizedPolyline) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + normalizedVertices_ = java.util.Collections.emptyList(); + + private void ensureNormalizedVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + normalizedVertices_ = + new java.util.ArrayList( + normalizedVertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedVertex, + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder> + normalizedVerticesBuilder_; + + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public java.util.List + getNormalizedVerticesList() { + if (normalizedVerticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } else { + return normalizedVerticesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public int getNormalizedVerticesCount() { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.size(); + } else { + return normalizedVerticesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex getNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.datalabeling.v1beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder setNormalizedVertices( + int index, com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.set(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder addNormalizedVertices( + com.google.cloud.datalabeling.v1beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.datalabeling.v1beta1.NormalizedVertex value) { + if (normalizedVerticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, value); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder addNormalizedVertices( + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder addNormalizedVertices( + int index, com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder builderForValue) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.add(index, builderForValue.build()); + onChanged(); + } else { + normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder addAllNormalizedVertices( + java.lang.Iterable + values) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, normalizedVertices_); + onChanged(); + } else { + normalizedVerticesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder clearNormalizedVertices() { + if (normalizedVerticesBuilder_ == null) { + normalizedVertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + normalizedVerticesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public Builder removeNormalizedVertices(int index) { + if (normalizedVerticesBuilder_ == null) { + ensureNormalizedVerticesIsMutable(); + normalizedVertices_.remove(index); + onChanged(); + } else { + normalizedVerticesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder + getNormalizedVerticesBuilder(int index) { + return getNormalizedVerticesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder + getNormalizedVerticesOrBuilder(int index) { + if (normalizedVerticesBuilder_ == null) { + return normalizedVertices_.get(index); + } else { + return normalizedVerticesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public java.util.List + getNormalizedVerticesOrBuilderList() { + if (normalizedVerticesBuilder_ != null) { + return normalizedVerticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(normalizedVertices_); + } + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder + addNormalizedVerticesBuilder() { + return getNormalizedVerticesFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.NormalizedVertex.getDefaultInstance()); + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder + addNormalizedVerticesBuilder(int index) { + return getNormalizedVerticesFieldBuilder() + .addBuilder( + index, com.google.cloud.datalabeling.v1beta1.NormalizedVertex.getDefaultInstance()); + } + /** + * + * + *
+     * The normalized polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + public java.util.List + getNormalizedVerticesBuilderList() { + return getNormalizedVerticesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedVertex, + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder> + getNormalizedVerticesFieldBuilder() { + if (normalizedVerticesBuilder_ == null) { + normalizedVerticesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedVertex, + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder>( + normalizedVertices_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + normalizedVertices_ = null; + } + return normalizedVerticesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.NormalizedPolyline) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.NormalizedPolyline) + private static final com.google.cloud.datalabeling.v1beta1.NormalizedPolyline DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.NormalizedPolyline(); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedPolyline getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedPolyline parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NormalizedPolyline(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedPolyline getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedPolylineOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedPolylineOrBuilder.java new file mode 100644 index 000000000000..5bedf25c12f0 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedPolylineOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface NormalizedPolylineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.NormalizedPolyline) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The normalized polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + java.util.List + getNormalizedVerticesList(); + /** + * + * + *
+   * The normalized polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.NormalizedVertex getNormalizedVertices(int index); + /** + * + * + *
+   * The normalized polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + int getNormalizedVerticesCount(); + /** + * + * + *
+   * The normalized polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + java.util.List + getNormalizedVerticesOrBuilderList(); + /** + * + * + *
+   * The normalized polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.NormalizedVertex normalized_vertices = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( + int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedVertex.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedVertex.java new file mode 100644 index 000000000000..d48e6d15f8aa --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedVertex.java @@ -0,0 +1,601 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the normalized vertex coordinates are relative to the original image
+ * and range from 0 to 1.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.NormalizedVertex} + */ +public final class NormalizedVertex extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.NormalizedVertex) + NormalizedVertexOrBuilder { + private static final long serialVersionUID = 0L; + // Use NormalizedVertex.newBuilder() to construct. + private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NormalizedVertex() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NormalizedVertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + x_ = input.readFloat(); + break; + } + case 21: + { + y_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.class, + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_; + /** + * + * + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + */ + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_; + /** + * + * + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + */ + public float getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (x_ != 0F) { + output.writeFloat(1, x_); + } + if (y_ != 0F) { + output.writeFloat(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (x_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, x_); + } + if (y_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.NormalizedVertex)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.NormalizedVertex other = + (com.google.cloud.datalabeling.v1beta1.NormalizedVertex) obj; + + if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) + return false; + if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getY()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.NormalizedVertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the normalized vertex coordinates are relative to the original image
+   * and range from 0 to 1.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.NormalizedVertex} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.NormalizedVertex) + com.google.cloud.datalabeling.v1beta1.NormalizedVertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedVertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.class, + com.google.cloud.datalabeling.v1beta1.NormalizedVertex.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.NormalizedVertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0F; + + y_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_NormalizedVertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.NormalizedVertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex build() { + com.google.cloud.datalabeling.v1beta1.NormalizedVertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex buildPartial() { + com.google.cloud.datalabeling.v1beta1.NormalizedVertex result = + new com.google.cloud.datalabeling.v1beta1.NormalizedVertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.NormalizedVertex) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.NormalizedVertex) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.NormalizedVertex other) { + if (other == com.google.cloud.datalabeling.v1beta1.NormalizedVertex.getDefaultInstance()) + return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.NormalizedVertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.NormalizedVertex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private float x_; + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + */ + public float getX() { + return x_; + } + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + */ + public Builder setX(float value) { + + x_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * float x = 1; + */ + public Builder clearX() { + + x_ = 0F; + onChanged(); + return this; + } + + private float y_; + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + */ + public float getY() { + return y_; + } + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + */ + public Builder setY(float value) { + + y_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * float y = 2; + */ + public Builder clearY() { + + y_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.NormalizedVertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.NormalizedVertex) + private static final com.google.cloud.datalabeling.v1beta1.NormalizedVertex DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.NormalizedVertex(); + } + + public static com.google.cloud.datalabeling.v1beta1.NormalizedVertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NormalizedVertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NormalizedVertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.NormalizedVertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedVertexOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedVertexOrBuilder.java new file mode 100644 index 000000000000..1c6388f81a4a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/NormalizedVertexOrBuilder.java @@ -0,0 +1,32 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface NormalizedVertexOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.NormalizedVertex) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * X coordinate.
+   * 
+ * + * float x = 1; + */ + float getX(); + + /** + * + * + *
+   * Y coordinate.
+   * 
+ * + * float y = 2; + */ + float getY(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectDetectionConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectDetectionConfig.java new file mode 100644 index 000000000000..d0e25c82fdbf --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectDetectionConfig.java @@ -0,0 +1,851 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Config for video object detection human labeling task.
+ * Object detection will be conducted on the images extracted from the video,
+ * and those objects will be labeled with bounding boxes.
+ * User need to specify the number of images to be extracted per second as the
+ * extraction frame rate.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ObjectDetectionConfig} + */ +public final class ObjectDetectionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + ObjectDetectionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectDetectionConfig.newBuilder() to construct. + private ObjectDetectionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ObjectDetectionConfig() { + annotationSpecSet_ = ""; + instructionMessage_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ObjectDetectionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationSpecSet_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instructionMessage_ = s; + break; + } + case 25: + { + extractionFrameRate_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.class, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder.class); + } + + public static final int ANNOTATION_SPEC_SET_FIELD_NUMBER = 1; + private volatile java.lang.Object annotationSpecSet_; + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTRUCTION_MESSAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object instructionMessage_; + /** + * + * + *
+   * Optional. Instruction message showed on labelers UI.
+   * 
+ * + * string instruction_message = 2; + */ + public java.lang.String getInstructionMessage() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructionMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Instruction message showed on labelers UI.
+   * 
+ * + * string instruction_message = 2; + */ + public com.google.protobuf.ByteString getInstructionMessageBytes() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructionMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTRACTION_FRAME_RATE_FIELD_NUMBER = 3; + private double extractionFrameRate_; + /** + * + * + *
+   * Required. Number of frames per second to be extracted from the video.
+   * 
+ * + * double extraction_frame_rate = 3; + */ + public double getExtractionFrameRate() { + return extractionFrameRate_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAnnotationSpecSetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecSet_); + } + if (!getInstructionMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instructionMessage_); + } + if (extractionFrameRate_ != 0D) { + output.writeDouble(3, extractionFrameRate_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAnnotationSpecSetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotationSpecSet_); + } + if (!getInstructionMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instructionMessage_); + } + if (extractionFrameRate_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, extractionFrameRate_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig other = + (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) obj; + + if (!getAnnotationSpecSet().equals(other.getAnnotationSpecSet())) return false; + if (!getInstructionMessage().equals(other.getInstructionMessage())) return false; + if (java.lang.Double.doubleToLongBits(getExtractionFrameRate()) + != java.lang.Double.doubleToLongBits(other.getExtractionFrameRate())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANNOTATION_SPEC_SET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSet().hashCode(); + hash = (37 * hash) + INSTRUCTION_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getInstructionMessage().hashCode(); + hash = (37 * hash) + EXTRACTION_FRAME_RATE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getExtractionFrameRate())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for video object detection human labeling task.
+   * Object detection will be conducted on the images extracted from the video,
+   * and those objects will be labeled with bounding boxes.
+   * User need to specify the number of images to be extracted per second as the
+   * extraction frame rate.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ObjectDetectionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectDetectionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectDetectionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.class, + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + annotationSpecSet_ = ""; + + instructionMessage_ = ""; + + extractionFrameRate_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectDetectionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig build() { + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig result = + new com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig(this); + result.annotationSpecSet_ = annotationSpecSet_; + result.instructionMessage_ = instructionMessage_; + result.extractionFrameRate_ = extractionFrameRate_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig other) { + if (other == com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig.getDefaultInstance()) + return this; + if (!other.getAnnotationSpecSet().isEmpty()) { + annotationSpecSet_ = other.annotationSpecSet_; + onChanged(); + } + if (!other.getInstructionMessage().isEmpty()) { + instructionMessage_ = other.instructionMessage_; + onChanged(); + } + if (other.getExtractionFrameRate() != 0D) { + setExtractionFrameRate(other.getExtractionFrameRate()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object annotationSpecSet_ = ""; + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSpecSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder clearAnnotationSpecSet() { + + annotationSpecSet_ = getDefaultInstance().getAnnotationSpecSet(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationSpecSet_ = value; + onChanged(); + return this; + } + + private java.lang.Object instructionMessage_ = ""; + /** + * + * + *
+     * Optional. Instruction message showed on labelers UI.
+     * 
+ * + * string instruction_message = 2; + */ + public java.lang.String getInstructionMessage() { + java.lang.Object ref = instructionMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructionMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Instruction message showed on labelers UI.
+     * 
+ * + * string instruction_message = 2; + */ + public com.google.protobuf.ByteString getInstructionMessageBytes() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructionMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Instruction message showed on labelers UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder setInstructionMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instructionMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Instruction message showed on labelers UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder clearInstructionMessage() { + + instructionMessage_ = getDefaultInstance().getInstructionMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Instruction message showed on labelers UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder setInstructionMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instructionMessage_ = value; + onChanged(); + return this; + } + + private double extractionFrameRate_; + /** + * + * + *
+     * Required. Number of frames per second to be extracted from the video.
+     * 
+ * + * double extraction_frame_rate = 3; + */ + public double getExtractionFrameRate() { + return extractionFrameRate_; + } + /** + * + * + *
+     * Required. Number of frames per second to be extracted from the video.
+     * 
+ * + * double extraction_frame_rate = 3; + */ + public Builder setExtractionFrameRate(double value) { + + extractionFrameRate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Number of frames per second to be extracted from the video.
+     * 
+ * + * double extraction_frame_rate = 3; + */ + public Builder clearExtractionFrameRate() { + + extractionFrameRate_ = 0D; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + private static final com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectDetectionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ObjectDetectionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectDetectionConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectDetectionConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectDetectionConfigOrBuilder.java new file mode 100644 index 000000000000..f87e096faa6c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectDetectionConfigOrBuilder.java @@ -0,0 +1,63 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ObjectDetectionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ObjectDetectionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + java.lang.String getAnnotationSpecSet(); + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + com.google.protobuf.ByteString getAnnotationSpecSetBytes(); + + /** + * + * + *
+   * Optional. Instruction message showed on labelers UI.
+   * 
+ * + * string instruction_message = 2; + */ + java.lang.String getInstructionMessage(); + /** + * + * + *
+   * Optional. Instruction message showed on labelers UI.
+   * 
+ * + * string instruction_message = 2; + */ + com.google.protobuf.ByteString getInstructionMessageBytes(); + + /** + * + * + *
+   * Required. Number of frames per second to be extracted from the video.
+   * 
+ * + * double extraction_frame_rate = 3; + */ + double getExtractionFrameRate(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingConfig.java new file mode 100644 index 000000000000..ee792a07d226 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingConfig.java @@ -0,0 +1,599 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Config for video object tracking human labeling task.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ObjectTrackingConfig} + */ +public final class ObjectTrackingConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + ObjectTrackingConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectTrackingConfig.newBuilder() to construct. + private ObjectTrackingConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ObjectTrackingConfig() { + annotationSpecSet_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ObjectTrackingConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationSpecSet_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.class, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder.class); + } + + public static final int ANNOTATION_SPEC_SET_FIELD_NUMBER = 1; + private volatile java.lang.Object annotationSpecSet_; + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAnnotationSpecSetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecSet_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAnnotationSpecSetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotationSpecSet_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig other = + (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) obj; + + if (!getAnnotationSpecSet().equals(other.getAnnotationSpecSet())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANNOTATION_SPEC_SET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSet().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for video object tracking human labeling task.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ObjectTrackingConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.class, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + annotationSpecSet_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig build() { + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig result = + new com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig(this); + result.annotationSpecSet_ = annotationSpecSet_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig other) { + if (other == com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig.getDefaultInstance()) + return this; + if (!other.getAnnotationSpecSet().isEmpty()) { + annotationSpecSet_ = other.annotationSpecSet_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object annotationSpecSet_ = ""; + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSpecSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder clearAnnotationSpecSet() { + + annotationSpecSet_ = getDefaultInstance().getAnnotationSpecSet(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationSpecSet_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + private static final com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectTrackingConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ObjectTrackingConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingConfigOrBuilder.java new file mode 100644 index 000000000000..c02ea103b22d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingConfigOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ObjectTrackingConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ObjectTrackingConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + java.lang.String getAnnotationSpecSet(); + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + com.google.protobuf.ByteString getAnnotationSpecSetBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingFrame.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingFrame.java new file mode 100644 index 000000000000..1e9a0d6dda0e --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingFrame.java @@ -0,0 +1,1211 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Video frame level annotation for object detection and tracking.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} + */ +public final class ObjectTrackingFrame extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.ObjectTrackingFrame) + ObjectTrackingFrameOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectTrackingFrame.newBuilder() to construct. + private ObjectTrackingFrame(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ObjectTrackingFrame() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ObjectTrackingFrame( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder subBuilder = null; + if (boundedAreaCase_ == 1) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_).toBuilder(); + } + boundedArea_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.BoundingPoly.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_); + boundedArea_ = subBuilder.buildPartial(); + } + boundedAreaCase_ = 1; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder subBuilder = + null; + if (boundedAreaCase_ == 2) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_) + .toBuilder(); + } + boundedArea_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_); + boundedArea_ = subBuilder.buildPartial(); + } + boundedAreaCase_ = 2; + break; + } + case 26: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeOffset_ != null) { + subBuilder = timeOffset_.toBuilder(); + } + timeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeOffset_); + timeOffset_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.class, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.Builder.class); + } + + private int boundedAreaCase_ = 0; + private java.lang.Object boundedArea_; + + public enum BoundedAreaCase implements com.google.protobuf.Internal.EnumLite { + BOUNDING_POLY(1), + NORMALIZED_BOUNDING_POLY(2), + BOUNDEDAREA_NOT_SET(0); + private final int value; + + private BoundedAreaCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static BoundedAreaCase valueOf(int value) { + return forNumber(value); + } + + public static BoundedAreaCase forNumber(int value) { + switch (value) { + case 1: + return BOUNDING_POLY; + case 2: + return NORMALIZED_BOUNDING_POLY; + case 0: + return BOUNDEDAREA_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public BoundedAreaCase getBoundedAreaCase() { + return BoundedAreaCase.forNumber(boundedAreaCase_); + } + + public static final int BOUNDING_POLY_FIELD_NUMBER = 1; + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + public boolean hasBoundingPoly() { + return boundedAreaCase_ == 1; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + public com.google.cloud.datalabeling.v1beta1.BoundingPoly getBoundingPoly() { + if (boundedAreaCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if (boundedAreaCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } + + public static final int NORMALIZED_BOUNDING_POLY_FIELD_NUMBER = 2; + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + public boolean hasNormalizedBoundingPoly() { + return boundedAreaCase_ == 2; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly getNormalizedBoundingPoly() { + if (boundedAreaCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder + getNormalizedBoundingPolyOrBuilder() { + if (boundedAreaCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } + + public static final int TIME_OFFSET_FIELD_NUMBER = 3; + private com.google.protobuf.Duration timeOffset_; + /** + * + * + *
+   * The time offset of this frame relative to the beginning of the video.
+   * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + public boolean hasTimeOffset() { + return timeOffset_ != null; + } + /** + * + * + *
+   * The time offset of this frame relative to the beginning of the video.
+   * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + public com.google.protobuf.Duration getTimeOffset() { + return timeOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeOffset_; + } + /** + * + * + *
+   * The time offset of this frame relative to the beginning of the video.
+   * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + return getTimeOffset(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (boundedAreaCase_ == 1) { + output.writeMessage(1, (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_); + } + if (boundedAreaCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_); + } + if (timeOffset_ != null) { + output.writeMessage(3, getTimeOffset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (boundedAreaCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_); + } + if (boundedAreaCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_); + } + if (timeOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTimeOffset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame other = + (com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame) obj; + + if (hasTimeOffset() != other.hasTimeOffset()) return false; + if (hasTimeOffset()) { + if (!getTimeOffset().equals(other.getTimeOffset())) return false; + } + if (!getBoundedAreaCase().equals(other.getBoundedAreaCase())) return false; + switch (boundedAreaCase_) { + case 1: + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; + break; + case 2: + if (!getNormalizedBoundingPoly().equals(other.getNormalizedBoundingPoly())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimeOffset()) { + hash = (37 * hash) + TIME_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getTimeOffset().hashCode(); + } + switch (boundedAreaCase_) { + case 1: + hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getBoundingPoly().hashCode(); + break; + case 2: + hash = (37 * hash) + NORMALIZED_BOUNDING_POLY_FIELD_NUMBER; + hash = (53 * hash) + getNormalizedBoundingPoly().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video frame level annotation for object detection and tracking.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.ObjectTrackingFrame) + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.class, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + boundedAreaCase_ = 0; + boundedArea_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_ObjectTrackingFrame_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame build() { + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame buildPartial() { + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame result = + new com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame(this); + if (boundedAreaCase_ == 1) { + if (boundingPolyBuilder_ == null) { + result.boundedArea_ = boundedArea_; + } else { + result.boundedArea_ = boundingPolyBuilder_.build(); + } + } + if (boundedAreaCase_ == 2) { + if (normalizedBoundingPolyBuilder_ == null) { + result.boundedArea_ = boundedArea_; + } else { + result.boundedArea_ = normalizedBoundingPolyBuilder_.build(); + } + } + if (timeOffsetBuilder_ == null) { + result.timeOffset_ = timeOffset_; + } else { + result.timeOffset_ = timeOffsetBuilder_.build(); + } + result.boundedAreaCase_ = boundedAreaCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame other) { + if (other == com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.getDefaultInstance()) + return this; + if (other.hasTimeOffset()) { + mergeTimeOffset(other.getTimeOffset()); + } + switch (other.getBoundedAreaCase()) { + case BOUNDING_POLY: + { + mergeBoundingPoly(other.getBoundingPoly()); + break; + } + case NORMALIZED_BOUNDING_POLY: + { + mergeNormalizedBoundingPoly(other.getNormalizedBoundingPoly()); + break; + } + case BOUNDEDAREA_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int boundedAreaCase_ = 0; + private java.lang.Object boundedArea_; + + public BoundedAreaCase getBoundedAreaCase() { + return BoundedAreaCase.forNumber(boundedAreaCase_); + } + + public Builder clearBoundedArea() { + boundedAreaCase_ = 0; + boundedArea_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPoly, + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder> + boundingPolyBuilder_; + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + public boolean hasBoundingPoly() { + return boundedAreaCase_ == 1; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + public com.google.cloud.datalabeling.v1beta1.BoundingPoly getBoundingPoly() { + if (boundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } else { + if (boundedAreaCase_ == 1) { + return boundingPolyBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + public Builder setBoundingPoly(com.google.cloud.datalabeling.v1beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundedArea_ = value; + onChanged(); + } else { + boundingPolyBuilder_.setMessage(value); + } + boundedAreaCase_ = 1; + return this; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + public Builder setBoundingPoly( + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder builderForValue) { + if (boundingPolyBuilder_ == null) { + boundedArea_ = builderForValue.build(); + onChanged(); + } else { + boundingPolyBuilder_.setMessage(builderForValue.build()); + } + boundedAreaCase_ = 1; + return this; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + public Builder mergeBoundingPoly(com.google.cloud.datalabeling.v1beta1.BoundingPoly value) { + if (boundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 1 + && boundedArea_ + != com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance()) { + boundedArea_ = + com.google.cloud.datalabeling.v1beta1.BoundingPoly.newBuilder( + (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_) + .mergeFrom(value) + .buildPartial(); + } else { + boundedArea_ = value; + } + onChanged(); + } else { + if (boundedAreaCase_ == 1) { + boundingPolyBuilder_.mergeFrom(value); + } + boundingPolyBuilder_.setMessage(value); + } + boundedAreaCase_ = 1; + return this; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + public Builder clearBoundingPoly() { + if (boundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 1) { + boundedAreaCase_ = 0; + boundedArea_ = null; + onChanged(); + } + } else { + if (boundedAreaCase_ == 1) { + boundedAreaCase_ = 0; + boundedArea_ = null; + } + boundingPolyBuilder_.clear(); + } + return this; + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + public com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder getBoundingPolyBuilder() { + return getBoundingPolyFieldBuilder().getBuilder(); + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + public com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { + if ((boundedAreaCase_ == 1) && (boundingPolyBuilder_ != null)) { + return boundingPolyBuilder_.getMessageOrBuilder(); + } else { + if (boundedAreaCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } + } + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPoly, + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder> + getBoundingPolyFieldBuilder() { + if (boundingPolyBuilder_ == null) { + if (!(boundedAreaCase_ == 1)) { + boundedArea_ = com.google.cloud.datalabeling.v1beta1.BoundingPoly.getDefaultInstance(); + } + boundingPolyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.BoundingPoly, + com.google.cloud.datalabeling.v1beta1.BoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.BoundingPoly) boundedArea_, + getParentForChildren(), + isClean()); + boundedArea_ = null; + } + boundedAreaCase_ = 1; + onChanged(); + ; + return boundingPolyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder> + normalizedBoundingPolyBuilder_; + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + public boolean hasNormalizedBoundingPoly() { + return boundedAreaCase_ == 2; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + getNormalizedBoundingPoly() { + if (normalizedBoundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } else { + if (boundedAreaCase_ == 2) { + return normalizedBoundingPolyBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + public Builder setNormalizedBoundingPoly( + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly value) { + if (normalizedBoundingPolyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + boundedArea_ = value; + onChanged(); + } else { + normalizedBoundingPolyBuilder_.setMessage(value); + } + boundedAreaCase_ = 2; + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + public Builder setNormalizedBoundingPoly( + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder builderForValue) { + if (normalizedBoundingPolyBuilder_ == null) { + boundedArea_ = builderForValue.build(); + onChanged(); + } else { + normalizedBoundingPolyBuilder_.setMessage(builderForValue.build()); + } + boundedAreaCase_ = 2; + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + public Builder mergeNormalizedBoundingPoly( + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly value) { + if (normalizedBoundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 2 + && boundedArea_ + != com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + .getDefaultInstance()) { + boundedArea_ = + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.newBuilder( + (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_) + .mergeFrom(value) + .buildPartial(); + } else { + boundedArea_ = value; + } + onChanged(); + } else { + if (boundedAreaCase_ == 2) { + normalizedBoundingPolyBuilder_.mergeFrom(value); + } + normalizedBoundingPolyBuilder_.setMessage(value); + } + boundedAreaCase_ = 2; + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + public Builder clearNormalizedBoundingPoly() { + if (normalizedBoundingPolyBuilder_ == null) { + if (boundedAreaCase_ == 2) { + boundedAreaCase_ = 0; + boundedArea_ = null; + onChanged(); + } + } else { + if (boundedAreaCase_ == 2) { + boundedAreaCase_ = 0; + boundedArea_ = null; + } + normalizedBoundingPolyBuilder_.clear(); + } + return this; + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder + getNormalizedBoundingPolyBuilder() { + return getNormalizedBoundingPolyFieldBuilder().getBuilder(); + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder + getNormalizedBoundingPolyOrBuilder() { + if ((boundedAreaCase_ == 2) && (normalizedBoundingPolyBuilder_ != null)) { + return normalizedBoundingPolyBuilder_.getMessageOrBuilder(); + } else { + if (boundedAreaCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_; + } + return com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } + } + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder> + getNormalizedBoundingPolyFieldBuilder() { + if (normalizedBoundingPolyBuilder_ == null) { + if (!(boundedAreaCase_ == 2)) { + boundedArea_ = + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.getDefaultInstance(); + } + normalizedBoundingPolyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.Builder, + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) boundedArea_, + getParentForChildren(), + isClean()); + boundedArea_ = null; + } + boundedAreaCase_ = 2; + onChanged(); + ; + return normalizedBoundingPolyBuilder_; + } + + private com.google.protobuf.Duration timeOffset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeOffsetBuilder_; + /** + * + * + *
+     * The time offset of this frame relative to the beginning of the video.
+     * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + public boolean hasTimeOffset() { + return timeOffsetBuilder_ != null || timeOffset_ != null; + } + /** + * + * + *
+     * The time offset of this frame relative to the beginning of the video.
+     * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + public com.google.protobuf.Duration getTimeOffset() { + if (timeOffsetBuilder_ == null) { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } else { + return timeOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time offset of this frame relative to the beginning of the video.
+     * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + public Builder setTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeOffset_ = value; + onChanged(); + } else { + timeOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time offset of this frame relative to the beginning of the video.
+     * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + public Builder setTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (timeOffsetBuilder_ == null) { + timeOffset_ = builderForValue.build(); + onChanged(); + } else { + timeOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time offset of this frame relative to the beginning of the video.
+     * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + public Builder mergeTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (timeOffset_ != null) { + timeOffset_ = + com.google.protobuf.Duration.newBuilder(timeOffset_).mergeFrom(value).buildPartial(); + } else { + timeOffset_ = value; + } + onChanged(); + } else { + timeOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time offset of this frame relative to the beginning of the video.
+     * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + public Builder clearTimeOffset() { + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + onChanged(); + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time offset of this frame relative to the beginning of the video.
+     * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + public com.google.protobuf.Duration.Builder getTimeOffsetBuilder() { + + onChanged(); + return getTimeOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time offset of this frame relative to the beginning of the video.
+     * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + if (timeOffsetBuilder_ != null) { + return timeOffsetBuilder_.getMessageOrBuilder(); + } else { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } + } + /** + * + * + *
+     * The time offset of this frame relative to the beginning of the video.
+     * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeOffsetFieldBuilder() { + if (timeOffsetBuilder_ == null) { + timeOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeOffset(), getParentForChildren(), isClean()); + timeOffset_ = null; + } + return timeOffsetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.ObjectTrackingFrame) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.ObjectTrackingFrame) + private static final com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame(); + } + + public static com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectTrackingFrame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ObjectTrackingFrame(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingFrameOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingFrameOrBuilder.java new file mode 100644 index 000000000000..66e66a7b8a25 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ObjectTrackingFrameOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface ObjectTrackingFrameOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.ObjectTrackingFrame) + com.google.protobuf.MessageOrBuilder { + + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + boolean hasBoundingPoly(); + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + com.google.cloud.datalabeling.v1beta1.BoundingPoly getBoundingPoly(); + /** .google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1; */ + com.google.cloud.datalabeling.v1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); + + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + boolean hasNormalizedBoundingPoly(); + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly getNormalizedBoundingPoly(); + /** + * .google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2; + * + */ + com.google.cloud.datalabeling.v1beta1.NormalizedBoundingPolyOrBuilder + getNormalizedBoundingPolyOrBuilder(); + + /** + * + * + *
+   * The time offset of this frame relative to the beginning of the video.
+   * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + boolean hasTimeOffset(); + /** + * + * + *
+   * The time offset of this frame relative to the beginning of the video.
+   * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + com.google.protobuf.Duration getTimeOffset(); + /** + * + * + *
+   * The time offset of this frame relative to the beginning of the video.
+   * 
+ * + * .google.protobuf.Duration time_offset = 3; + */ + com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder(); + + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.BoundedAreaCase + getBoundedAreaCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Operations.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Operations.java new file mode 100644 index 000000000000..ea891ec91b87 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Operations.java @@ -0,0 +1,404 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/operations.proto + +package com.google.cloud.datalabeling.v1beta1; + +public final class Operations { + private Operations() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelImageClassificationOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelImageClassificationOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingBoxOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingBoxOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelImageOrientedBoundingBoxOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelImageOrientedBoundingBoxOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingPolyOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingPolyOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelImagePolylineOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelImagePolylineOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelImageSegmentationOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelImageSegmentationOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoClassificationOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoClassificationOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectDetectionOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectDetectionOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectTrackingOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectTrackingOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoEventOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoEventOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelTextClassificationOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelTextClassificationOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelAudioTranscriptionOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelAudioTranscriptionOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_LabelTextEntityExtractionOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_LabelTextEntityExtractionOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n2google/cloud/datalabeling/v1beta1/oper" + + "ations.proto\022!google.cloud.datalabeling." + + "v1beta1\032/google/cloud/datalabeling/v1bet" + + "a1/dataset.proto\032?google/cloud/datalabel" + + "ing/v1beta1/human_annotation_config.prot" + + "o\0323google/cloud/datalabeling/v1beta1/ins" + + "truction.proto\032\037google/protobuf/timestam" + + "p.proto\032\027google/rpc/status.proto\032\034google" + + "/api/annotations.proto\"Y\n\033ImportDataOper" + + "ationResponse\022\017\n\007dataset\030\001 \001(\t\022\023\n\013total_" + + "count\030\002 \001(\005\022\024\n\014import_count\030\003 \001(\005\"\345\001\n\033Ex" + + "portDataOperationResponse\022\017\n\007dataset\030\001 \001" + + "(\t\022\023\n\013total_count\030\002 \001(\005\022\024\n\014export_count\030" + + "\003 \001(\005\022B\n\013label_stats\030\004 \001(\0132-.google.clou" + + "d.datalabeling.v1beta1.LabelStats\022F\n\rout" + + "put_config\030\005 \001(\0132/.google.cloud.datalabe" + + "ling.v1beta1.OutputConfig\"\\\n\033ImportDataO" + + "perationMetadata\022\017\n\007dataset\030\001 \001(\t\022,\n\020par" + + "tial_failures\030\002 \003(\0132\022.google.rpc.Status\"" + + "\\\n\033ExportDataOperationMetadata\022\017\n\007datase" + + "t\030\001 \001(\t\022,\n\020partial_failures\030\002 \003(\0132\022.goog" + + "le.rpc.Status\"\317\014\n\026LabelOperationMetadata" + + "\022\030\n\020progress_percent\030\001 \001(\005\022,\n\020partial_fa" + + "ilures\030\002 \003(\0132\022.google.rpc.Status\022t\n\034imag" + + "e_classification_details\030\003 \001(\0132L.google." + + "cloud.datalabeling.v1beta1.LabelImageCla" + + "ssificationOperationMetadataH\000\022o\n\032image_" + + "bounding_box_details\030\004 \001(\0132I.google.clou" + + "d.datalabeling.v1beta1.LabelImageBoundin" + + "gBoxOperationMetadataH\000\022q\n\033image_boundin" + + "g_poly_details\030\013 \001(\0132J.google.cloud.data" + + "labeling.v1beta1.LabelImageBoundingPolyO" + + "perationMetadataH\000\022\200\001\n#image_oriented_bo" + + "unding_box_details\030\016 \001(\0132Q.google.cloud." + + "datalabeling.v1beta1.LabelImageOrientedB" + + "oundingBoxOperationMetadataH\000\022h\n\026image_p" + + "olyline_details\030\014 \001(\0132F.google.cloud.dat" + + "alabeling.v1beta1.LabelImagePolylineOper" + + "ationMetadataH\000\022p\n\032image_segmentation_de" + + "tails\030\017 \001(\0132J.google.cloud.datalabeling." + + "v1beta1.LabelImageSegmentationOperationM" + + "etadataH\000\022t\n\034video_classification_detail" + + "s\030\005 \001(\0132L.google.cloud.datalabeling.v1be" + + "ta1.LabelVideoClassificationOperationMet" + + "adataH\000\022w\n\036video_object_detection_detail" + + "s\030\006 \001(\0132M.google.cloud.datalabeling.v1be" + + "ta1.LabelVideoObjectDetectionOperationMe" + + "tadataH\000\022u\n\035video_object_tracking_detail" + + "s\030\007 \001(\0132L.google.cloud.datalabeling.v1be" + + "ta1.LabelVideoObjectTrackingOperationMet" + + "adataH\000\022b\n\023video_event_details\030\010 \001(\0132C.g" + + "oogle.cloud.datalabeling.v1beta1.LabelVi" + + "deoEventOperationMetadataH\000\022r\n\033text_clas" + + "sification_details\030\t \001(\0132K.google.cloud." + + "datalabeling.v1beta1.LabelTextClassifica" + + "tionOperationMetadataH\000\022r\n\033audio_transcr" + + "iption_details\030\n \001(\0132K.google.cloud.data" + + "labeling.v1beta1.LabelAudioTranscription" + + "OperationMetadataH\000\022w\n\036text_entity_extra" + + "ction_details\030\r \001(\0132M.google.cloud.datal" + + "abeling.v1beta1.LabelTextEntityExtractio" + + "nOperationMetadataH\000B\t\n\007details\"{\n)Label" + + "ImageClassificationOperationMetadata\022N\n\014" + + "basic_config\030\001 \001(\01328.google.cloud.datala" + + "beling.v1beta1.HumanAnnotationConfig\"x\n&" + + "LabelImageBoundingBoxOperationMetadata\022N" + + "\n\014basic_config\030\001 \001(\01328.google.cloud.data" + + "labeling.v1beta1.HumanAnnotationConfig\"\200" + + "\001\n.LabelImageOrientedBoundingBoxOperatio" + + "nMetadata\022N\n\014basic_config\030\001 \001(\01328.google" + + ".cloud.datalabeling.v1beta1.HumanAnnotat" + + "ionConfig\"y\n\'LabelImageBoundingPolyOpera" + + "tionMetadata\022N\n\014basic_config\030\001 \001(\01328.goo" + + "gle.cloud.datalabeling.v1beta1.HumanAnno" + + "tationConfig\"u\n#LabelImagePolylineOperat" + + "ionMetadata\022N\n\014basic_config\030\001 \001(\01328.goog" + + "le.cloud.datalabeling.v1beta1.HumanAnnot" + + "ationConfig\"y\n\'LabelImageSegmentationOpe" + + "rationMetadata\022N\n\014basic_config\030\001 \001(\01328.g" + + "oogle.cloud.datalabeling.v1beta1.HumanAn" + + "notationConfig\"{\n)LabelVideoClassificati" + + "onOperationMetadata\022N\n\014basic_config\030\001 \001(" + + "\01328.google.cloud.datalabeling.v1beta1.Hu" + + "manAnnotationConfig\"|\n*LabelVideoObjectD" + + "etectionOperationMetadata\022N\n\014basic_confi" + + "g\030\001 \001(\01328.google.cloud.datalabeling.v1be" + + "ta1.HumanAnnotationConfig\"{\n)LabelVideoO" + + "bjectTrackingOperationMetadata\022N\n\014basic_" + + "config\030\001 \001(\01328.google.cloud.datalabeling" + + ".v1beta1.HumanAnnotationConfig\"r\n LabelV" + + "ideoEventOperationMetadata\022N\n\014basic_conf" + + "ig\030\001 \001(\01328.google.cloud.datalabeling.v1b" + + "eta1.HumanAnnotationConfig\"z\n(LabelTextC" + + "lassificationOperationMetadata\022N\n\014basic_" + + "config\030\001 \001(\01328.google.cloud.datalabeling" + + ".v1beta1.HumanAnnotationConfig\"z\n(LabelA" + + "udioTranscriptionOperationMetadata\022N\n\014ba" + + "sic_config\030\001 \001(\01328.google.cloud.datalabe" + + "ling.v1beta1.HumanAnnotationConfig\"|\n*La" + + "belTextEntityExtractionOperationMetadata" + + "\022N\n\014basic_config\030\001 \001(\01328.google.cloud.da" + + "talabeling.v1beta1.HumanAnnotationConfig" + + "\"^\n\031CreateInstructionMetadata\022\023\n\013instruc" + + "tion\030\001 \001(\t\022,\n\020partial_failures\030\002 \003(\0132\022.g" + + "oogle.rpc.StatusBx\n%com.google.cloud.dat" + + "alabeling.v1beta1P\001ZMgoogle.golang.org/g" + + "enproto/googleapis/cloud/datalabeling/v1" + + "beta1;datalabelingb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.cloud.datalabeling.v1beta1.DatasetOuterClass.getDescriptor(), + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass.getDescriptor(), + com.google.cloud.datalabeling.v1beta1.InstructionOuterClass.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }, + assigner); + internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationResponse_descriptor, + new java.lang.String[] { + "Dataset", "TotalCount", "ImportCount", + }); + internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationResponse_descriptor, + new java.lang.String[] { + "Dataset", "TotalCount", "ExportCount", "LabelStats", "OutputConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ImportDataOperationMetadata_descriptor, + new java.lang.String[] { + "Dataset", "PartialFailures", + }); + internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_ExportDataOperationMetadata_descriptor, + new java.lang.String[] { + "Dataset", "PartialFailures", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_datalabeling_v1beta1_LabelOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelOperationMetadata_descriptor, + new java.lang.String[] { + "ProgressPercent", + "PartialFailures", + "ImageClassificationDetails", + "ImageBoundingBoxDetails", + "ImageBoundingPolyDetails", + "ImageOrientedBoundingBoxDetails", + "ImagePolylineDetails", + "ImageSegmentationDetails", + "VideoClassificationDetails", + "VideoObjectDetectionDetails", + "VideoObjectTrackingDetails", + "VideoEventDetails", + "TextClassificationDetails", + "AudioTranscriptionDetails", + "TextEntityExtractionDetails", + "Details", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageClassificationOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageClassificationOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelImageClassificationOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingBoxOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingBoxOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingBoxOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageOrientedBoundingBoxOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageOrientedBoundingBoxOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelImageOrientedBoundingBoxOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingPolyOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingPolyOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelImageBoundingPolyOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelImagePolylineOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_datalabeling_v1beta1_LabelImagePolylineOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelImagePolylineOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageSegmentationOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_datalabeling_v1beta1_LabelImageSegmentationOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelImageSegmentationOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoClassificationOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoClassificationOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoClassificationOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectDetectionOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectDetectionOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectDetectionOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectTrackingOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectTrackingOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoObjectTrackingOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoEventOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoEventOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelVideoEventOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelTextClassificationOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_datalabeling_v1beta1_LabelTextClassificationOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelTextClassificationOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelAudioTranscriptionOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_datalabeling_v1beta1_LabelAudioTranscriptionOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelAudioTranscriptionOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_LabelTextEntityExtractionOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_datalabeling_v1beta1_LabelTextEntityExtractionOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_LabelTextEntityExtractionOperationMetadata_descriptor, + new java.lang.String[] { + "BasicConfig", + }); + internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionMetadata_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_datalabeling_v1beta1_CreateInstructionMetadata_descriptor, + new java.lang.String[] { + "Instruction", "PartialFailures", + }); + com.google.cloud.datalabeling.v1beta1.DatasetOuterClass.getDescriptor(); + com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass.getDescriptor(); + com.google.cloud.datalabeling.v1beta1.InstructionOuterClass.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OperatorMetadata.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OperatorMetadata.java new file mode 100644 index 000000000000..34ac066b1bae --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OperatorMetadata.java @@ -0,0 +1,827 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * General information useful for labels coming from contributors.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.OperatorMetadata} + */ +public final class OperatorMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.OperatorMetadata) + OperatorMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use OperatorMetadata.newBuilder() to construct. + private OperatorMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OperatorMetadata() { + comments_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperatorMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + score_ = input.readFloat(); + break; + } + case 16: + { + totalVotes_ = input.readInt32(); + break; + } + case 24: + { + labelVotes_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + comments_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + comments_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000008) != 0)) { + comments_ = comments_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_OperatorMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_OperatorMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.OperatorMetadata.class, + com.google.cloud.datalabeling.v1beta1.OperatorMetadata.Builder.class); + } + + private int bitField0_; + public static final int SCORE_FIELD_NUMBER = 1; + private float score_; + /** + * + * + *
+   * Confidence score corresponding to a label. For examle, if 3 contributors
+   * have answered the question and 2 of them agree on the final label, the
+   * confidence score will be 0.67 (2/3).
+   * 
+ * + * float score = 1; + */ + public float getScore() { + return score_; + } + + public static final int TOTAL_VOTES_FIELD_NUMBER = 2; + private int totalVotes_; + /** + * + * + *
+   * The total number of contributors that answer this question.
+   * 
+ * + * int32 total_votes = 2; + */ + public int getTotalVotes() { + return totalVotes_; + } + + public static final int LABEL_VOTES_FIELD_NUMBER = 3; + private int labelVotes_; + /** + * + * + *
+   * The total number of contributors that choose this label.
+   * 
+ * + * int32 label_votes = 3; + */ + public int getLabelVotes() { + return labelVotes_; + } + + public static final int COMMENTS_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList comments_; + /** repeated string comments = 4; */ + public com.google.protobuf.ProtocolStringList getCommentsList() { + return comments_; + } + /** repeated string comments = 4; */ + public int getCommentsCount() { + return comments_.size(); + } + /** repeated string comments = 4; */ + public java.lang.String getComments(int index) { + return comments_.get(index); + } + /** repeated string comments = 4; */ + public com.google.protobuf.ByteString getCommentsBytes(int index) { + return comments_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (score_ != 0F) { + output.writeFloat(1, score_); + } + if (totalVotes_ != 0) { + output.writeInt32(2, totalVotes_); + } + if (labelVotes_ != 0) { + output.writeInt32(3, labelVotes_); + } + for (int i = 0; i < comments_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, comments_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (score_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, score_); + } + if (totalVotes_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, totalVotes_); + } + if (labelVotes_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, labelVotes_); + } + { + int dataSize = 0; + for (int i = 0; i < comments_.size(); i++) { + dataSize += computeStringSizeNoTag(comments_.getRaw(i)); + } + size += dataSize; + size += 1 * getCommentsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.OperatorMetadata)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.OperatorMetadata other = + (com.google.cloud.datalabeling.v1beta1.OperatorMetadata) obj; + + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (getTotalVotes() != other.getTotalVotes()) return false; + if (getLabelVotes() != other.getLabelVotes()) return false; + if (!getCommentsList().equals(other.getCommentsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); + hash = (37 * hash) + TOTAL_VOTES_FIELD_NUMBER; + hash = (53 * hash) + getTotalVotes(); + hash = (37 * hash) + LABEL_VOTES_FIELD_NUMBER; + hash = (53 * hash) + getLabelVotes(); + if (getCommentsCount() > 0) { + hash = (37 * hash) + COMMENTS_FIELD_NUMBER; + hash = (53 * hash) + getCommentsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.OperatorMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * General information useful for labels coming from contributors.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.OperatorMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.OperatorMetadata) + com.google.cloud.datalabeling.v1beta1.OperatorMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_OperatorMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_OperatorMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.OperatorMetadata.class, + com.google.cloud.datalabeling.v1beta1.OperatorMetadata.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.OperatorMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + score_ = 0F; + + totalVotes_ = 0; + + labelVotes_ = 0; + + comments_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_OperatorMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.OperatorMetadata getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.OperatorMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.OperatorMetadata build() { + com.google.cloud.datalabeling.v1beta1.OperatorMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.OperatorMetadata buildPartial() { + com.google.cloud.datalabeling.v1beta1.OperatorMetadata result = + new com.google.cloud.datalabeling.v1beta1.OperatorMetadata(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.score_ = score_; + result.totalVotes_ = totalVotes_; + result.labelVotes_ = labelVotes_; + if (((bitField0_ & 0x00000008) != 0)) { + comments_ = comments_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.comments_ = comments_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.OperatorMetadata) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.OperatorMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.OperatorMetadata other) { + if (other == com.google.cloud.datalabeling.v1beta1.OperatorMetadata.getDefaultInstance()) + return this; + if (other.getScore() != 0F) { + setScore(other.getScore()); + } + if (other.getTotalVotes() != 0) { + setTotalVotes(other.getTotalVotes()); + } + if (other.getLabelVotes() != 0) { + setLabelVotes(other.getLabelVotes()); + } + if (!other.comments_.isEmpty()) { + if (comments_.isEmpty()) { + comments_ = other.comments_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureCommentsIsMutable(); + comments_.addAll(other.comments_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.OperatorMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.OperatorMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private float score_; + /** + * + * + *
+     * Confidence score corresponding to a label. For examle, if 3 contributors
+     * have answered the question and 2 of them agree on the final label, the
+     * confidence score will be 0.67 (2/3).
+     * 
+ * + * float score = 1; + */ + public float getScore() { + return score_; + } + /** + * + * + *
+     * Confidence score corresponding to a label. For examle, if 3 contributors
+     * have answered the question and 2 of them agree on the final label, the
+     * confidence score will be 0.67 (2/3).
+     * 
+ * + * float score = 1; + */ + public Builder setScore(float value) { + + score_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Confidence score corresponding to a label. For examle, if 3 contributors
+     * have answered the question and 2 of them agree on the final label, the
+     * confidence score will be 0.67 (2/3).
+     * 
+ * + * float score = 1; + */ + public Builder clearScore() { + + score_ = 0F; + onChanged(); + return this; + } + + private int totalVotes_; + /** + * + * + *
+     * The total number of contributors that answer this question.
+     * 
+ * + * int32 total_votes = 2; + */ + public int getTotalVotes() { + return totalVotes_; + } + /** + * + * + *
+     * The total number of contributors that answer this question.
+     * 
+ * + * int32 total_votes = 2; + */ + public Builder setTotalVotes(int value) { + + totalVotes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of contributors that answer this question.
+     * 
+ * + * int32 total_votes = 2; + */ + public Builder clearTotalVotes() { + + totalVotes_ = 0; + onChanged(); + return this; + } + + private int labelVotes_; + /** + * + * + *
+     * The total number of contributors that choose this label.
+     * 
+ * + * int32 label_votes = 3; + */ + public int getLabelVotes() { + return labelVotes_; + } + /** + * + * + *
+     * The total number of contributors that choose this label.
+     * 
+ * + * int32 label_votes = 3; + */ + public Builder setLabelVotes(int value) { + + labelVotes_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The total number of contributors that choose this label.
+     * 
+ * + * int32 label_votes = 3; + */ + public Builder clearLabelVotes() { + + labelVotes_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList comments_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureCommentsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + comments_ = new com.google.protobuf.LazyStringArrayList(comments_); + bitField0_ |= 0x00000008; + } + } + /** repeated string comments = 4; */ + public com.google.protobuf.ProtocolStringList getCommentsList() { + return comments_.getUnmodifiableView(); + } + /** repeated string comments = 4; */ + public int getCommentsCount() { + return comments_.size(); + } + /** repeated string comments = 4; */ + public java.lang.String getComments(int index) { + return comments_.get(index); + } + /** repeated string comments = 4; */ + public com.google.protobuf.ByteString getCommentsBytes(int index) { + return comments_.getByteString(index); + } + /** repeated string comments = 4; */ + public Builder setComments(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentsIsMutable(); + comments_.set(index, value); + onChanged(); + return this; + } + /** repeated string comments = 4; */ + public Builder addComments(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentsIsMutable(); + comments_.add(value); + onChanged(); + return this; + } + /** repeated string comments = 4; */ + public Builder addAllComments(java.lang.Iterable values) { + ensureCommentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, comments_); + onChanged(); + return this; + } + /** repeated string comments = 4; */ + public Builder clearComments() { + comments_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** repeated string comments = 4; */ + public Builder addCommentsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureCommentsIsMutable(); + comments_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.OperatorMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.OperatorMetadata) + private static final com.google.cloud.datalabeling.v1beta1.OperatorMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.OperatorMetadata(); + } + + public static com.google.cloud.datalabeling.v1beta1.OperatorMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperatorMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperatorMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.OperatorMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OperatorMetadataOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OperatorMetadataOrBuilder.java new file mode 100644 index 000000000000..2bed9f39e287 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OperatorMetadataOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface OperatorMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.OperatorMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Confidence score corresponding to a label. For examle, if 3 contributors
+   * have answered the question and 2 of them agree on the final label, the
+   * confidence score will be 0.67 (2/3).
+   * 
+ * + * float score = 1; + */ + float getScore(); + + /** + * + * + *
+   * The total number of contributors that answer this question.
+   * 
+ * + * int32 total_votes = 2; + */ + int getTotalVotes(); + + /** + * + * + *
+   * The total number of contributors that choose this label.
+   * 
+ * + * int32 label_votes = 3; + */ + int getLabelVotes(); + + /** repeated string comments = 4; */ + java.util.List getCommentsList(); + /** repeated string comments = 4; */ + int getCommentsCount(); + /** repeated string comments = 4; */ + java.lang.String getComments(int index); + /** repeated string comments = 4; */ + com.google.protobuf.ByteString getCommentsBytes(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OutputConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OutputConfig.java new file mode 100644 index 000000000000..d46f334a4a67 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OutputConfig.java @@ -0,0 +1,1142 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * The configuration of output data.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.OutputConfig} + */ +public final class OutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.OutputConfig) + OutputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use OutputConfig.newBuilder() to construct. + private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OutputConfig() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OutputConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.GcsDestination.Builder subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.GcsDestination) destination_) + .toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.GcsDestination.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.GcsDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.Builder subBuilder = null; + if (destinationCase_ == 2) { + subBuilder = + ((com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) destination_) + .toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 2; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.OutputConfig.class, + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder.class); + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase implements com.google.protobuf.Internal.EnumLite { + GCS_DESTINATION(1), + GCS_FOLDER_DESTINATION(2), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_DESTINATION; + case 2: + return GCS_FOLDER_DESTINATION; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + /** + * + * + *
+   * Output to a GCS file. Should be used for labeling output other than Audio
+   * transcription.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + * + * + *
+   * Output to a GCS file. Should be used for labeling output other than Audio
+   * transcription.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.datalabeling.v1beta1.GcsDestination getGcsDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.GcsDestination) destination_; + } + return com.google.cloud.datalabeling.v1beta1.GcsDestination.getDefaultInstance(); + } + /** + * + * + *
+   * Output to a GCS file. Should be used for labeling output other than Audio
+   * transcription.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.datalabeling.v1beta1.GcsDestinationOrBuilder + getGcsDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.GcsDestination) destination_; + } + return com.google.cloud.datalabeling.v1beta1.GcsDestination.getDefaultInstance(); + } + + public static final int GCS_FOLDER_DESTINATION_FIELD_NUMBER = 2; + /** + * + * + *
+   * Output to a GCS folder. Should be used for Audio transcription
+   * labeling output.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + public boolean hasGcsFolderDestination() { + return destinationCase_ == 2; + } + /** + * + * + *
+   * Output to a GCS folder. Should be used for Audio transcription
+   * labeling output.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.GcsFolderDestination getGcsFolderDestination() { + if (destinationCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) destination_; + } + return com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.getDefaultInstance(); + } + /** + * + * + *
+   * Output to a GCS folder. Should be used for Audio transcription
+   * labeling output.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.GcsFolderDestinationOrBuilder + getGcsFolderDestinationOrBuilder() { + if (destinationCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) destination_; + } + return com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (destinationCase_ == 1) { + output.writeMessage(1, (com.google.cloud.datalabeling.v1beta1.GcsDestination) destination_); + } + if (destinationCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.datalabeling.v1beta1.GcsDestination) destination_); + } + if (destinationCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) destination_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.OutputConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.OutputConfig other = + (com.google.cloud.datalabeling.v1beta1.OutputConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsDestination().equals(other.getGcsDestination())) return false; + break; + case 2: + if (!getGcsFolderDestination().equals(other.getGcsFolderDestination())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 2: + hash = (37 * hash) + GCS_FOLDER_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsFolderDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.OutputConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The configuration of output data.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.OutputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.OutputConfig) + com.google.cloud.datalabeling.v1beta1.OutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_OutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_OutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.OutputConfig.class, + com.google.cloud.datalabeling.v1beta1.OutputConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.OutputConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_OutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.OutputConfig getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.OutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.OutputConfig build() { + com.google.cloud.datalabeling.v1beta1.OutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.OutputConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.OutputConfig result = + new com.google.cloud.datalabeling.v1beta1.OutputConfig(this); + if (destinationCase_ == 1) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + if (destinationCase_ == 2) { + if (gcsFolderDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsFolderDestinationBuilder_.build(); + } + } + result.destinationCase_ = destinationCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.OutputConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.OutputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.OutputConfig other) { + if (other == com.google.cloud.datalabeling.v1beta1.OutputConfig.getDefaultInstance()) + return this; + switch (other.getDestinationCase()) { + case GCS_DESTINATION: + { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case GCS_FOLDER_DESTINATION: + { + mergeGcsFolderDestination(other.getGcsFolderDestination()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.OutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.OutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.GcsDestination, + com.google.cloud.datalabeling.v1beta1.GcsDestination.Builder, + com.google.cloud.datalabeling.v1beta1.GcsDestinationOrBuilder> + gcsDestinationBuilder_; + /** + * + * + *
+     * Output to a GCS file. Should be used for labeling output other than Audio
+     * transcription.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + * + * + *
+     * Output to a GCS file. Should be used for labeling output other than Audio
+     * transcription.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.datalabeling.v1beta1.GcsDestination getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.GcsDestination) destination_; + } + return com.google.cloud.datalabeling.v1beta1.GcsDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output to a GCS file. Should be used for labeling output other than Audio
+     * transcription.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination(com.google.cloud.datalabeling.v1beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * Output to a GCS file. Should be used for labeling output other than Audio
+     * transcription.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + public Builder setGcsDestination( + com.google.cloud.datalabeling.v1beta1.GcsDestination.Builder builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * Output to a GCS file. Should be used for labeling output other than Audio
+     * transcription.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + public Builder mergeGcsDestination(com.google.cloud.datalabeling.v1beta1.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1 + && destination_ + != com.google.cloud.datalabeling.v1beta1.GcsDestination.getDefaultInstance()) { + destination_ = + com.google.cloud.datalabeling.v1beta1.GcsDestination.newBuilder( + (com.google.cloud.datalabeling.v1beta1.GcsDestination) destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 1) { + gcsDestinationBuilder_.mergeFrom(value); + } + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * Output to a GCS file. Should be used for labeling output other than Audio
+     * transcription.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output to a GCS file. Should be used for labeling output other than Audio
+     * transcription.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.datalabeling.v1beta1.GcsDestination.Builder getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output to a GCS file. Should be used for labeling output other than Audio
+     * transcription.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + public com.google.cloud.datalabeling.v1beta1.GcsDestinationOrBuilder + getGcsDestinationOrBuilder() { + if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.datalabeling.v1beta1.GcsDestination) destination_; + } + return com.google.cloud.datalabeling.v1beta1.GcsDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output to a GCS file. Should be used for labeling output other than Audio
+     * transcription.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.GcsDestination, + com.google.cloud.datalabeling.v1beta1.GcsDestination.Builder, + com.google.cloud.datalabeling.v1beta1.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = com.google.cloud.datalabeling.v1beta1.GcsDestination.getDefaultInstance(); + } + gcsDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.GcsDestination, + com.google.cloud.datalabeling.v1beta1.GcsDestination.Builder, + com.google.cloud.datalabeling.v1beta1.GcsDestinationOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.GcsDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged(); + ; + return gcsDestinationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination, + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.Builder, + com.google.cloud.datalabeling.v1beta1.GcsFolderDestinationOrBuilder> + gcsFolderDestinationBuilder_; + /** + * + * + *
+     * Output to a GCS folder. Should be used for Audio transcription
+     * labeling output.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + public boolean hasGcsFolderDestination() { + return destinationCase_ == 2; + } + /** + * + * + *
+     * Output to a GCS folder. Should be used for Audio transcription
+     * labeling output.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.GcsFolderDestination getGcsFolderDestination() { + if (gcsFolderDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) destination_; + } + return com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.getDefaultInstance(); + } else { + if (destinationCase_ == 2) { + return gcsFolderDestinationBuilder_.getMessage(); + } + return com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output to a GCS folder. Should be used for Audio transcription
+     * labeling output.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + public Builder setGcsFolderDestination( + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination value) { + if (gcsFolderDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsFolderDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Output to a GCS folder. Should be used for Audio transcription
+     * labeling output.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + public Builder setGcsFolderDestination( + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.Builder builderForValue) { + if (gcsFolderDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsFolderDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Output to a GCS folder. Should be used for Audio transcription
+     * labeling output.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + public Builder mergeGcsFolderDestination( + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination value) { + if (gcsFolderDestinationBuilder_ == null) { + if (destinationCase_ == 2 + && destination_ + != com.google.cloud.datalabeling.v1beta1.GcsFolderDestination + .getDefaultInstance()) { + destination_ = + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.newBuilder( + (com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 2) { + gcsFolderDestinationBuilder_.mergeFrom(value); + } + gcsFolderDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Output to a GCS folder. Should be used for Audio transcription
+     * labeling output.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + public Builder clearGcsFolderDestination() { + if (gcsFolderDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + } + gcsFolderDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output to a GCS folder. Should be used for Audio transcription
+     * labeling output.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.Builder + getGcsFolderDestinationBuilder() { + return getGcsFolderDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output to a GCS folder. Should be used for Audio transcription
+     * labeling output.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + public com.google.cloud.datalabeling.v1beta1.GcsFolderDestinationOrBuilder + getGcsFolderDestinationOrBuilder() { + if ((destinationCase_ == 2) && (gcsFolderDestinationBuilder_ != null)) { + return gcsFolderDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 2) { + return (com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) destination_; + } + return com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output to a GCS folder. Should be used for Audio transcription
+     * labeling output.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination, + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.Builder, + com.google.cloud.datalabeling.v1beta1.GcsFolderDestinationOrBuilder> + getGcsFolderDestinationFieldBuilder() { + if (gcsFolderDestinationBuilder_ == null) { + if (!(destinationCase_ == 2)) { + destination_ = + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.getDefaultInstance(); + } + gcsFolderDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination, + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination.Builder, + com.google.cloud.datalabeling.v1beta1.GcsFolderDestinationOrBuilder>( + (com.google.cloud.datalabeling.v1beta1.GcsFolderDestination) destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 2; + onChanged(); + ; + return gcsFolderDestinationBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.OutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.OutputConfig) + private static final com.google.cloud.datalabeling.v1beta1.OutputConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.OutputConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.OutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OutputConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.OutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OutputConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OutputConfigOrBuilder.java new file mode 100644 index 000000000000..9b4cada6e9df --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/OutputConfigOrBuilder.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface OutputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.OutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output to a GCS file. Should be used for labeling output other than Audio
+   * transcription.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + boolean hasGcsDestination(); + /** + * + * + *
+   * Output to a GCS file. Should be used for labeling output other than Audio
+   * transcription.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.datalabeling.v1beta1.GcsDestination getGcsDestination(); + /** + * + * + *
+   * Output to a GCS file. Should be used for labeling output other than Audio
+   * transcription.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1; + */ + com.google.cloud.datalabeling.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); + + /** + * + * + *
+   * Output to a GCS folder. Should be used for Audio transcription
+   * labeling output.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + boolean hasGcsFolderDestination(); + /** + * + * + *
+   * Output to a GCS folder. Should be used for Audio transcription
+   * labeling output.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + com.google.cloud.datalabeling.v1beta1.GcsFolderDestination getGcsFolderDestination(); + /** + * + * + *
+   * Output to a GCS folder. Should be used for Audio transcription
+   * labeling output.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2; + * + */ + com.google.cloud.datalabeling.v1beta1.GcsFolderDestinationOrBuilder + getGcsFolderDestinationOrBuilder(); + + public com.google.cloud.datalabeling.v1beta1.OutputConfig.DestinationCase getDestinationCase(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PdfInstruction.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PdfInstruction.java new file mode 100644 index 000000000000..39c7291ff05d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PdfInstruction.java @@ -0,0 +1,598 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/instruction.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Instruction from a PDF file.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.PdfInstruction} + */ +public final class PdfInstruction extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.PdfInstruction) + PdfInstructionOrBuilder { + private static final long serialVersionUID = 0L; + // Use PdfInstruction.newBuilder() to construct. + private PdfInstruction(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PdfInstruction() { + gcsFileUri_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PdfInstruction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + gcsFileUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_PdfInstruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_PdfInstruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.PdfInstruction.class, + com.google.cloud.datalabeling.v1beta1.PdfInstruction.Builder.class); + } + + public static final int GCS_FILE_URI_FIELD_NUMBER = 1; + private volatile java.lang.Object gcsFileUri_; + /** + * + * + *
+   * PDF file for the instruction. Only gcs path is allowed.
+   * 
+ * + * string gcs_file_uri = 1; + */ + public java.lang.String getGcsFileUri() { + java.lang.Object ref = gcsFileUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsFileUri_ = s; + return s; + } + } + /** + * + * + *
+   * PDF file for the instruction. Only gcs path is allowed.
+   * 
+ * + * string gcs_file_uri = 1; + */ + public com.google.protobuf.ByteString getGcsFileUriBytes() { + java.lang.Object ref = gcsFileUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsFileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getGcsFileUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsFileUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getGcsFileUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, gcsFileUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.PdfInstruction)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.PdfInstruction other = + (com.google.cloud.datalabeling.v1beta1.PdfInstruction) obj; + + if (!getGcsFileUri().equals(other.getGcsFileUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GCS_FILE_URI_FIELD_NUMBER; + hash = (53 * hash) + getGcsFileUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.PdfInstruction prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Instruction from a PDF file.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.PdfInstruction} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.PdfInstruction) + com.google.cloud.datalabeling.v1beta1.PdfInstructionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_PdfInstruction_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_PdfInstruction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.PdfInstruction.class, + com.google.cloud.datalabeling.v1beta1.PdfInstruction.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.PdfInstruction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + gcsFileUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.InstructionOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_PdfInstruction_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.PdfInstruction getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.PdfInstruction.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.PdfInstruction build() { + com.google.cloud.datalabeling.v1beta1.PdfInstruction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.PdfInstruction buildPartial() { + com.google.cloud.datalabeling.v1beta1.PdfInstruction result = + new com.google.cloud.datalabeling.v1beta1.PdfInstruction(this); + result.gcsFileUri_ = gcsFileUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.PdfInstruction) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.PdfInstruction) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.PdfInstruction other) { + if (other == com.google.cloud.datalabeling.v1beta1.PdfInstruction.getDefaultInstance()) + return this; + if (!other.getGcsFileUri().isEmpty()) { + gcsFileUri_ = other.gcsFileUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.PdfInstruction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.PdfInstruction) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object gcsFileUri_ = ""; + /** + * + * + *
+     * PDF file for the instruction. Only gcs path is allowed.
+     * 
+ * + * string gcs_file_uri = 1; + */ + public java.lang.String getGcsFileUri() { + java.lang.Object ref = gcsFileUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gcsFileUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * PDF file for the instruction. Only gcs path is allowed.
+     * 
+ * + * string gcs_file_uri = 1; + */ + public com.google.protobuf.ByteString getGcsFileUriBytes() { + java.lang.Object ref = gcsFileUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + gcsFileUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * PDF file for the instruction. Only gcs path is allowed.
+     * 
+ * + * string gcs_file_uri = 1; + */ + public Builder setGcsFileUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + gcsFileUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * PDF file for the instruction. Only gcs path is allowed.
+     * 
+ * + * string gcs_file_uri = 1; + */ + public Builder clearGcsFileUri() { + + gcsFileUri_ = getDefaultInstance().getGcsFileUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * PDF file for the instruction. Only gcs path is allowed.
+     * 
+ * + * string gcs_file_uri = 1; + */ + public Builder setGcsFileUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + gcsFileUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.PdfInstruction) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.PdfInstruction) + private static final com.google.cloud.datalabeling.v1beta1.PdfInstruction DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.PdfInstruction(); + } + + public static com.google.cloud.datalabeling.v1beta1.PdfInstruction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PdfInstruction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PdfInstruction(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.PdfInstruction getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PdfInstructionOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PdfInstructionOrBuilder.java new file mode 100644 index 000000000000..cba17660b18f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PdfInstructionOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/instruction.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface PdfInstructionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.PdfInstruction) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * PDF file for the instruction. Only gcs path is allowed.
+   * 
+ * + * string gcs_file_uri = 1; + */ + java.lang.String getGcsFileUri(); + /** + * + * + *
+   * PDF file for the instruction. Only gcs path is allowed.
+   * 
+ * + * string gcs_file_uri = 1; + */ + com.google.protobuf.ByteString getGcsFileUriBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Polyline.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Polyline.java new file mode 100644 index 000000000000..d69b8931b037 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Polyline.java @@ -0,0 +1,923 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * A line with multiple line segments.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Polyline} + */ +public final class Polyline extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.Polyline) + PolylineOrBuilder { + private static final long serialVersionUID = 0L; + // Use Polyline.newBuilder() to construct. + private Polyline(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Polyline() { + vertices_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Polyline( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + vertices_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.Vertex.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Polyline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Polyline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Polyline.class, + com.google.cloud.datalabeling.v1beta1.Polyline.Builder.class); + } + + public static final int VERTICES_FIELD_NUMBER = 1; + private java.util.List vertices_; + /** + * + * + *
+   * The polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public java.util.List getVerticesList() { + return vertices_; + } + /** + * + * + *
+   * The polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesOrBuilderList() { + return vertices_; + } + /** + * + * + *
+   * The polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public int getVerticesCount() { + return vertices_.size(); + } + /** + * + * + *
+   * The polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Vertex getVertices(int index) { + return vertices_.get(index); + } + /** + * + * + *
+   * The polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.VertexOrBuilder getVerticesOrBuilder(int index) { + return vertices_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < vertices_.size(); i++) { + output.writeMessage(1, vertices_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < vertices_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, vertices_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.Polyline)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.Polyline other = + (com.google.cloud.datalabeling.v1beta1.Polyline) obj; + + if (!getVerticesList().equals(other.getVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getVerticesCount() > 0) { + hash = (37 * hash) + VERTICES_FIELD_NUMBER; + hash = (53 * hash) + getVerticesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.Polyline prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A line with multiple line segments.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Polyline} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.Polyline) + com.google.cloud.datalabeling.v1beta1.PolylineOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Polyline_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Polyline_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Polyline.class, + com.google.cloud.datalabeling.v1beta1.Polyline.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.Polyline.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVerticesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + verticesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Polyline_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Polyline getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.Polyline.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Polyline build() { + com.google.cloud.datalabeling.v1beta1.Polyline result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Polyline buildPartial() { + com.google.cloud.datalabeling.v1beta1.Polyline result = + new com.google.cloud.datalabeling.v1beta1.Polyline(this); + int from_bitField0_ = bitField0_; + if (verticesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + vertices_ = java.util.Collections.unmodifiableList(vertices_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.vertices_ = vertices_; + } else { + result.vertices_ = verticesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.Polyline) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.Polyline) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.Polyline other) { + if (other == com.google.cloud.datalabeling.v1beta1.Polyline.getDefaultInstance()) return this; + if (verticesBuilder_ == null) { + if (!other.vertices_.isEmpty()) { + if (vertices_.isEmpty()) { + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureVerticesIsMutable(); + vertices_.addAll(other.vertices_); + } + onChanged(); + } + } else { + if (!other.vertices_.isEmpty()) { + if (verticesBuilder_.isEmpty()) { + verticesBuilder_.dispose(); + verticesBuilder_ = null; + vertices_ = other.vertices_; + bitField0_ = (bitField0_ & ~0x00000001); + verticesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVerticesFieldBuilder() + : null; + } else { + verticesBuilder_.addAllMessages(other.vertices_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.Polyline parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datalabeling.v1beta1.Polyline) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List vertices_ = + java.util.Collections.emptyList(); + + private void ensureVerticesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + vertices_ = + new java.util.ArrayList(vertices_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Vertex, + com.google.cloud.datalabeling.v1beta1.Vertex.Builder, + com.google.cloud.datalabeling.v1beta1.VertexOrBuilder> + verticesBuilder_; + + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public java.util.List getVerticesList() { + if (verticesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vertices_); + } else { + return verticesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public int getVerticesCount() { + if (verticesBuilder_ == null) { + return vertices_.size(); + } else { + return verticesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Vertex getVertices(int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); + } else { + return verticesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder setVertices(int index, com.google.cloud.datalabeling.v1beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.set(index, value); + onChanged(); + } else { + verticesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder setVertices( + int index, com.google.cloud.datalabeling.v1beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.set(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder addVertices(com.google.cloud.datalabeling.v1beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(value); + onChanged(); + } else { + verticesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder addVertices(int index, com.google.cloud.datalabeling.v1beta1.Vertex value) { + if (verticesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVerticesIsMutable(); + vertices_.add(index, value); + onChanged(); + } else { + verticesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder addVertices( + com.google.cloud.datalabeling.v1beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder addVertices( + int index, com.google.cloud.datalabeling.v1beta1.Vertex.Builder builderForValue) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.add(index, builderForValue.build()); + onChanged(); + } else { + verticesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder addAllVertices( + java.lang.Iterable values) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vertices_); + onChanged(); + } else { + verticesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder clearVertices() { + if (verticesBuilder_ == null) { + vertices_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + verticesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public Builder removeVertices(int index) { + if (verticesBuilder_ == null) { + ensureVerticesIsMutable(); + vertices_.remove(index); + onChanged(); + } else { + verticesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Vertex.Builder getVerticesBuilder(int index) { + return getVerticesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.VertexOrBuilder getVerticesOrBuilder(int index) { + if (verticesBuilder_ == null) { + return vertices_.get(index); + } else { + return verticesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesOrBuilderList() { + if (verticesBuilder_ != null) { + return verticesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vertices_); + } + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Vertex.Builder addVerticesBuilder() { + return getVerticesFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.Vertex.getDefaultInstance()); + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public com.google.cloud.datalabeling.v1beta1.Vertex.Builder addVerticesBuilder(int index) { + return getVerticesFieldBuilder() + .addBuilder(index, com.google.cloud.datalabeling.v1beta1.Vertex.getDefaultInstance()); + } + /** + * + * + *
+     * The polyline vertices.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + public java.util.List + getVerticesBuilderList() { + return getVerticesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Vertex, + com.google.cloud.datalabeling.v1beta1.Vertex.Builder, + com.google.cloud.datalabeling.v1beta1.VertexOrBuilder> + getVerticesFieldBuilder() { + if (verticesBuilder_ == null) { + verticesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.Vertex, + com.google.cloud.datalabeling.v1beta1.Vertex.Builder, + com.google.cloud.datalabeling.v1beta1.VertexOrBuilder>( + vertices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + vertices_ = null; + } + return verticesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.Polyline) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.Polyline) + private static final com.google.cloud.datalabeling.v1beta1.Polyline DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.Polyline(); + } + + public static com.google.cloud.datalabeling.v1beta1.Polyline getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Polyline parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Polyline(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Polyline getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PolylineConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PolylineConfig.java new file mode 100644 index 000000000000..4dbb47aa4eb3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PolylineConfig.java @@ -0,0 +1,759 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Config for image polyline human labeling task.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.PolylineConfig} + */ +public final class PolylineConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.PolylineConfig) + PolylineConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PolylineConfig.newBuilder() to construct. + private PolylineConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PolylineConfig() { + annotationSpecSet_ = ""; + instructionMessage_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PolylineConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationSpecSet_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instructionMessage_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_PolylineConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_PolylineConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.PolylineConfig.class, + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder.class); + } + + public static final int ANNOTATION_SPEC_SET_FIELD_NUMBER = 1; + private volatile java.lang.Object annotationSpecSet_; + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTRUCTION_MESSAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object instructionMessage_; + /** + * + * + *
+   * Optional. Instruction message showed on contributors UI.
+   * 
+ * + * string instruction_message = 2; + */ + public java.lang.String getInstructionMessage() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructionMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Instruction message showed on contributors UI.
+   * 
+ * + * string instruction_message = 2; + */ + public com.google.protobuf.ByteString getInstructionMessageBytes() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructionMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAnnotationSpecSetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecSet_); + } + if (!getInstructionMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instructionMessage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAnnotationSpecSetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotationSpecSet_); + } + if (!getInstructionMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instructionMessage_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.PolylineConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.PolylineConfig other = + (com.google.cloud.datalabeling.v1beta1.PolylineConfig) obj; + + if (!getAnnotationSpecSet().equals(other.getAnnotationSpecSet())) return false; + if (!getInstructionMessage().equals(other.getInstructionMessage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANNOTATION_SPEC_SET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSet().hashCode(); + hash = (37 * hash) + INSTRUCTION_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getInstructionMessage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.PolylineConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for image polyline human labeling task.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.PolylineConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.PolylineConfig) + com.google.cloud.datalabeling.v1beta1.PolylineConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_PolylineConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_PolylineConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.PolylineConfig.class, + com.google.cloud.datalabeling.v1beta1.PolylineConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.PolylineConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + annotationSpecSet_ = ""; + + instructionMessage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_PolylineConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.PolylineConfig getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.PolylineConfig build() { + com.google.cloud.datalabeling.v1beta1.PolylineConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.PolylineConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.PolylineConfig result = + new com.google.cloud.datalabeling.v1beta1.PolylineConfig(this); + result.annotationSpecSet_ = annotationSpecSet_; + result.instructionMessage_ = instructionMessage_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.PolylineConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.PolylineConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.PolylineConfig other) { + if (other == com.google.cloud.datalabeling.v1beta1.PolylineConfig.getDefaultInstance()) + return this; + if (!other.getAnnotationSpecSet().isEmpty()) { + annotationSpecSet_ = other.annotationSpecSet_; + onChanged(); + } + if (!other.getInstructionMessage().isEmpty()) { + instructionMessage_ = other.instructionMessage_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.PolylineConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.PolylineConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object annotationSpecSet_ = ""; + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSpecSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder clearAnnotationSpecSet() { + + annotationSpecSet_ = getDefaultInstance().getAnnotationSpecSet(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationSpecSet_ = value; + onChanged(); + return this; + } + + private java.lang.Object instructionMessage_ = ""; + /** + * + * + *
+     * Optional. Instruction message showed on contributors UI.
+     * 
+ * + * string instruction_message = 2; + */ + public java.lang.String getInstructionMessage() { + java.lang.Object ref = instructionMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructionMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Instruction message showed on contributors UI.
+     * 
+ * + * string instruction_message = 2; + */ + public com.google.protobuf.ByteString getInstructionMessageBytes() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructionMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Instruction message showed on contributors UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder setInstructionMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instructionMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Instruction message showed on contributors UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder clearInstructionMessage() { + + instructionMessage_ = getDefaultInstance().getInstructionMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Instruction message showed on contributors UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder setInstructionMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instructionMessage_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.PolylineConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.PolylineConfig) + private static final com.google.cloud.datalabeling.v1beta1.PolylineConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.PolylineConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.PolylineConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PolylineConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PolylineConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.PolylineConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PolylineConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PolylineConfigOrBuilder.java new file mode 100644 index 000000000000..b43541ed8983 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PolylineConfigOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface PolylineConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.PolylineConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + java.lang.String getAnnotationSpecSet(); + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + com.google.protobuf.ByteString getAnnotationSpecSetBytes(); + + /** + * + * + *
+   * Optional. Instruction message showed on contributors UI.
+   * 
+ * + * string instruction_message = 2; + */ + java.lang.String getInstructionMessage(); + /** + * + * + *
+   * Optional. Instruction message showed on contributors UI.
+   * 
+ * + * string instruction_message = 2; + */ + com.google.protobuf.ByteString getInstructionMessageBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PolylineOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PolylineOrBuilder.java new file mode 100644 index 000000000000..aeb3ed0c482a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/PolylineOrBuilder.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface PolylineOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.Polyline) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + java.util.List getVerticesList(); + /** + * + * + *
+   * The polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + com.google.cloud.datalabeling.v1beta1.Vertex getVertices(int index); + /** + * + * + *
+   * The polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + int getVerticesCount(); + /** + * + * + *
+   * The polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + java.util.List + getVerticesOrBuilderList(); + /** + * + * + *
+   * The polyline vertices.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.Vertex vertices = 1; + */ + com.google.cloud.datalabeling.v1beta1.VertexOrBuilder getVerticesOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ProjectName.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ProjectName.java new file mode 100644 index 000000000000..ff40b3db3bfb --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/ProjectName.java @@ -0,0 +1,160 @@ +/* + * 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.datalabeling.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 ProjectName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + + private volatile Map fieldValuesMap; + + private final String project; + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private ProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public static ProjectName of(String project) { + return newBuilder().setProject(project).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + public static ProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "ProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + 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 (ProjectName 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); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project); + } + + /** Builder for ProjectName. */ + public static class Builder { + + private String project; + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder() {} + + private Builder(ProjectName projectName) { + project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ProjectName) { + ProjectName that = (ProjectName) o; + return (this.project.equals(that.project)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SegmentationConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SegmentationConfig.java new file mode 100644 index 000000000000..fd348156cdde --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SegmentationConfig.java @@ -0,0 +1,767 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Config for image segmentation
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.SegmentationConfig} + */ +public final class SegmentationConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.SegmentationConfig) + SegmentationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SegmentationConfig.newBuilder() to construct. + private SegmentationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SegmentationConfig() { + annotationSpecSet_ = ""; + instructionMessage_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SegmentationConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationSpecSet_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + instructionMessage_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_SegmentationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_SegmentationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.class, + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder.class); + } + + public static final int ANNOTATION_SPEC_SET_FIELD_NUMBER = 1; + private volatile java.lang.Object annotationSpecSet_; + /** + * + * + *
+   * Required. Annotation spec set resource name. format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Annotation spec set resource name. format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTRUCTION_MESSAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object instructionMessage_; + /** + * + * + *
+   * Instruction message showed on labelers UI.
+   * 
+ * + * string instruction_message = 2; + */ + public java.lang.String getInstructionMessage() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructionMessage_ = s; + return s; + } + } + /** + * + * + *
+   * Instruction message showed on labelers UI.
+   * 
+ * + * string instruction_message = 2; + */ + public com.google.protobuf.ByteString getInstructionMessageBytes() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructionMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAnnotationSpecSetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecSet_); + } + if (!getInstructionMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instructionMessage_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAnnotationSpecSetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotationSpecSet_); + } + if (!getInstructionMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, instructionMessage_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.SegmentationConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.SegmentationConfig other = + (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) obj; + + if (!getAnnotationSpecSet().equals(other.getAnnotationSpecSet())) return false; + if (!getInstructionMessage().equals(other.getInstructionMessage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANNOTATION_SPEC_SET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSet().hashCode(); + hash = (37 * hash) + INSTRUCTION_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getInstructionMessage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.SegmentationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for image segmentation
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.SegmentationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.SegmentationConfig) + com.google.cloud.datalabeling.v1beta1.SegmentationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_SegmentationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_SegmentationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.class, + com.google.cloud.datalabeling.v1beta1.SegmentationConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.SegmentationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + annotationSpecSet_ = ""; + + instructionMessage_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_SegmentationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.SegmentationConfig getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.SegmentationConfig build() { + com.google.cloud.datalabeling.v1beta1.SegmentationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.SegmentationConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.SegmentationConfig result = + new com.google.cloud.datalabeling.v1beta1.SegmentationConfig(this); + result.annotationSpecSet_ = annotationSpecSet_; + result.instructionMessage_ = instructionMessage_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.SegmentationConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.SegmentationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.SegmentationConfig other) { + if (other == com.google.cloud.datalabeling.v1beta1.SegmentationConfig.getDefaultInstance()) + return this; + if (!other.getAnnotationSpecSet().isEmpty()) { + annotationSpecSet_ = other.annotationSpecSet_; + onChanged(); + } + if (!other.getInstructionMessage().isEmpty()) { + instructionMessage_ = other.instructionMessage_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.SegmentationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.SegmentationConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object annotationSpecSet_ = ""; + /** + * + * + *
+     * Required. Annotation spec set resource name. format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name. format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name. format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSpecSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name. format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder clearAnnotationSpecSet() { + + annotationSpecSet_ = getDefaultInstance().getAnnotationSpecSet(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name. format:
+     * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationSpecSet_ = value; + onChanged(); + return this; + } + + private java.lang.Object instructionMessage_ = ""; + /** + * + * + *
+     * Instruction message showed on labelers UI.
+     * 
+ * + * string instruction_message = 2; + */ + public java.lang.String getInstructionMessage() { + java.lang.Object ref = instructionMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instructionMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Instruction message showed on labelers UI.
+     * 
+ * + * string instruction_message = 2; + */ + public com.google.protobuf.ByteString getInstructionMessageBytes() { + java.lang.Object ref = instructionMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instructionMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Instruction message showed on labelers UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder setInstructionMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instructionMessage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Instruction message showed on labelers UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder clearInstructionMessage() { + + instructionMessage_ = getDefaultInstance().getInstructionMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Instruction message showed on labelers UI.
+     * 
+ * + * string instruction_message = 2; + */ + public Builder setInstructionMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instructionMessage_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.SegmentationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.SegmentationConfig) + private static final com.google.cloud.datalabeling.v1beta1.SegmentationConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.SegmentationConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.SegmentationConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SegmentationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SegmentationConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.SegmentationConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SegmentationConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SegmentationConfigOrBuilder.java new file mode 100644 index 000000000000..c52888646890 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SegmentationConfigOrBuilder.java @@ -0,0 +1,54 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface SegmentationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.SegmentationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Annotation spec set resource name. format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string annotation_spec_set = 1; + */ + java.lang.String getAnnotationSpecSet(); + /** + * + * + *
+   * Required. Annotation spec set resource name. format:
+   * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}
+   * 
+ * + * string annotation_spec_set = 1; + */ + com.google.protobuf.ByteString getAnnotationSpecSetBytes(); + + /** + * + * + *
+   * Instruction message showed on labelers UI.
+   * 
+ * + * string instruction_message = 2; + */ + java.lang.String getInstructionMessage(); + /** + * + * + *
+   * Instruction message showed on labelers UI.
+   * 
+ * + * string instruction_message = 2; + */ + com.google.protobuf.ByteString getInstructionMessageBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SentimentConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SentimentConfig.java new file mode 100644 index 000000000000..ca26ca9faafd --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SentimentConfig.java @@ -0,0 +1,527 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Config for setting up sentiments.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.SentimentConfig} + */ +public final class SentimentConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.SentimentConfig) + SentimentConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SentimentConfig.newBuilder() to construct. + private SentimentConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SentimentConfig() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SentimentConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableLabelSentimentSelection_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_SentimentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_SentimentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.SentimentConfig.class, + com.google.cloud.datalabeling.v1beta1.SentimentConfig.Builder.class); + } + + public static final int ENABLE_LABEL_SENTIMENT_SELECTION_FIELD_NUMBER = 1; + private boolean enableLabelSentimentSelection_; + /** + * + * + *
+   * If set to true, contributors will have the option to select sentiment of
+   * the label they selected, to mark it as negative or positive label. Default
+   * is false.
+   * 
+ * + * bool enable_label_sentiment_selection = 1; + */ + public boolean getEnableLabelSentimentSelection() { + return enableLabelSentimentSelection_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableLabelSentimentSelection_ != false) { + output.writeBool(1, enableLabelSentimentSelection_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableLabelSentimentSelection_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableLabelSentimentSelection_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.SentimentConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.SentimentConfig other = + (com.google.cloud.datalabeling.v1beta1.SentimentConfig) obj; + + if (getEnableLabelSentimentSelection() != other.getEnableLabelSentimentSelection()) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_LABEL_SENTIMENT_SELECTION_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableLabelSentimentSelection()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.SentimentConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for setting up sentiments.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.SentimentConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.SentimentConfig) + com.google.cloud.datalabeling.v1beta1.SentimentConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_SentimentConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_SentimentConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.SentimentConfig.class, + com.google.cloud.datalabeling.v1beta1.SentimentConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.SentimentConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enableLabelSentimentSelection_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_SentimentConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.SentimentConfig getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.SentimentConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.SentimentConfig build() { + com.google.cloud.datalabeling.v1beta1.SentimentConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.SentimentConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.SentimentConfig result = + new com.google.cloud.datalabeling.v1beta1.SentimentConfig(this); + result.enableLabelSentimentSelection_ = enableLabelSentimentSelection_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.SentimentConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.SentimentConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.SentimentConfig other) { + if (other == com.google.cloud.datalabeling.v1beta1.SentimentConfig.getDefaultInstance()) + return this; + if (other.getEnableLabelSentimentSelection() != false) { + setEnableLabelSentimentSelection(other.getEnableLabelSentimentSelection()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.SentimentConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.SentimentConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enableLabelSentimentSelection_; + /** + * + * + *
+     * If set to true, contributors will have the option to select sentiment of
+     * the label they selected, to mark it as negative or positive label. Default
+     * is false.
+     * 
+ * + * bool enable_label_sentiment_selection = 1; + */ + public boolean getEnableLabelSentimentSelection() { + return enableLabelSentimentSelection_; + } + /** + * + * + *
+     * If set to true, contributors will have the option to select sentiment of
+     * the label they selected, to mark it as negative or positive label. Default
+     * is false.
+     * 
+ * + * bool enable_label_sentiment_selection = 1; + */ + public Builder setEnableLabelSentimentSelection(boolean value) { + + enableLabelSentimentSelection_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, contributors will have the option to select sentiment of
+     * the label they selected, to mark it as negative or positive label. Default
+     * is false.
+     * 
+ * + * bool enable_label_sentiment_selection = 1; + */ + public Builder clearEnableLabelSentimentSelection() { + + enableLabelSentimentSelection_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.SentimentConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.SentimentConfig) + private static final com.google.cloud.datalabeling.v1beta1.SentimentConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.SentimentConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.SentimentConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SentimentConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SentimentConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.SentimentConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SentimentConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SentimentConfigOrBuilder.java new file mode 100644 index 000000000000..eb95988e283a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/SentimentConfigOrBuilder.java @@ -0,0 +1,23 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface SentimentConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.SentimentConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If set to true, contributors will have the option to select sentiment of
+   * the label they selected, to mark it as negative or positive label. Default
+   * is false.
+   * 
+ * + * bool enable_label_sentiment_selection = 1; + */ + boolean getEnableLabelSentimentSelection(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/StringAggregationType.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/StringAggregationType.java new file mode 100644 index 000000000000..dacbed6fb23d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/StringAggregationType.java @@ -0,0 +1,152 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** Protobuf enum {@code google.cloud.datalabeling.v1beta1.StringAggregationType} */ +public enum StringAggregationType implements com.google.protobuf.ProtocolMessageEnum { + /** STRING_AGGREGATION_TYPE_UNSPECIFIED = 0; */ + STRING_AGGREGATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Majority vote to aggregate answers.
+   * 
+ * + * MAJORITY_VOTE = 1; + */ + MAJORITY_VOTE(1), + /** + * + * + *
+   * Unanimous answers will be adopted.
+   * 
+ * + * UNANIMOUS_VOTE = 2; + */ + UNANIMOUS_VOTE(2), + /** + * + * + *
+   * Preserve all answers by crowd compute.
+   * 
+ * + * NO_AGGREGATION = 3; + */ + NO_AGGREGATION(3), + UNRECOGNIZED(-1), + ; + + /** STRING_AGGREGATION_TYPE_UNSPECIFIED = 0; */ + public static final int STRING_AGGREGATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Majority vote to aggregate answers.
+   * 
+ * + * MAJORITY_VOTE = 1; + */ + public static final int MAJORITY_VOTE_VALUE = 1; + /** + * + * + *
+   * Unanimous answers will be adopted.
+   * 
+ * + * UNANIMOUS_VOTE = 2; + */ + public static final int UNANIMOUS_VOTE_VALUE = 2; + /** + * + * + *
+   * Preserve all answers by crowd compute.
+   * 
+ * + * NO_AGGREGATION = 3; + */ + public static final int NO_AGGREGATION_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static StringAggregationType valueOf(int value) { + return forNumber(value); + } + + public static StringAggregationType forNumber(int value) { + switch (value) { + case 0: + return STRING_AGGREGATION_TYPE_UNSPECIFIED; + case 1: + return MAJORITY_VOTE; + case 2: + return UNANIMOUS_VOTE; + case 3: + return NO_AGGREGATION; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public StringAggregationType findValueByNumber(int number) { + return StringAggregationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final StringAggregationType[] VALUES = values(); + + public static StringAggregationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private StringAggregationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.datalabeling.v1beta1.StringAggregationType) +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationAnnotation.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationAnnotation.java new file mode 100644 index 000000000000..192590240ae4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationAnnotation.java @@ -0,0 +1,718 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Text classification annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} + */ +public final class TextClassificationAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) + TextClassificationAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextClassificationAnnotation.newBuilder() to construct. + private TextClassificationAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextClassificationAnnotation() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextClassificationAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder subBuilder = null; + if (annotationSpec_ != null) { + subBuilder = annotationSpec_.toBuilder(); + } + annotationSpec_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationSpec_); + annotationSpec_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextClassificationAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextClassificationAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.class, + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.Builder.class); + } + + public static final int ANNOTATION_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + /** + * + * + *
+   * Label of the text.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpec_ != null; + } + /** + * + * + *
+   * Label of the text.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + /** + * + * + *
+   * Label of the text.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + return getAnnotationSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (annotationSpec_ != null) { + output.writeMessage(1, getAnnotationSpec()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (annotationSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnnotationSpec()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation other = + (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) obj; + + if (hasAnnotationSpec() != other.hasAnnotationSpec()) return false; + if (hasAnnotationSpec()) { + if (!getAnnotationSpec().equals(other.getAnnotationSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnnotationSpec()) { + hash = (37 * hash) + ANNOTATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Text classification annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextClassificationAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextClassificationAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.class, + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextClassificationAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation build() { + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation buildPartial() { + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation result = + new com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation(this); + if (annotationSpecBuilder_ == null) { + result.annotationSpec_ = annotationSpec_; + } else { + result.annotationSpec_ = annotationSpecBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation other) { + if (other + == com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + .getDefaultInstance()) return this; + if (other.hasAnnotationSpec()) { + mergeAnnotationSpec(other.getAnnotationSpec()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + annotationSpecBuilder_; + /** + * + * + *
+     * Label of the text.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpecBuilder_ != null || annotationSpec_ != null; + } + /** + * + * + *
+     * Label of the text.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } else { + return annotationSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Label of the text.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationSpec_ = value; + onChanged(); + } else { + annotationSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Label of the text.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder builderForValue) { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = builderForValue.build(); + onChanged(); + } else { + annotationSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Label of the text.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder mergeAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (annotationSpec_ != null) { + annotationSpec_ = + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.newBuilder(annotationSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationSpec_ = value; + } + onChanged(); + } else { + annotationSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Label of the text.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder clearAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + onChanged(); + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Label of the text.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder getAnnotationSpecBuilder() { + + onChanged(); + return getAnnotationSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Label of the text.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + if (annotationSpecBuilder_ != null) { + return annotationSpecBuilder_.getMessageOrBuilder(); + } else { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + } + /** + * + * + *
+     * Label of the text.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + getAnnotationSpecFieldBuilder() { + if (annotationSpecBuilder_ == null) { + annotationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>( + getAnnotationSpec(), getParentForChildren(), isClean()); + annotationSpec_ = null; + } + return annotationSpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) + private static final com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation(); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextClassificationAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextClassificationAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationAnnotationOrBuilder.java new file mode 100644 index 000000000000..781ac5892c63 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationAnnotationOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface TextClassificationAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Label of the text.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + boolean hasAnnotationSpec(); + /** + * + * + *
+   * Label of the text.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec(); + /** + * + * + *
+   * Label of the text.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder getAnnotationSpecOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationConfig.java new file mode 100644 index 000000000000..ebe77b1fecd4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationConfig.java @@ -0,0 +1,960 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Config for text classification human labeling task.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.TextClassificationConfig} + */ +public final class TextClassificationConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.TextClassificationConfig) + TextClassificationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextClassificationConfig.newBuilder() to construct. + private TextClassificationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextClassificationConfig() { + annotationSpecSet_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextClassificationConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + allowMultiLabel_ = input.readBool(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationSpecSet_ = s; + break; + } + case 26: + { + com.google.cloud.datalabeling.v1beta1.SentimentConfig.Builder subBuilder = null; + if (sentimentConfig_ != null) { + subBuilder = sentimentConfig_.toBuilder(); + } + sentimentConfig_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.SentimentConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sentimentConfig_); + sentimentConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextClassificationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextClassificationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.class, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder.class); + } + + public static final int ALLOW_MULTI_LABEL_FIELD_NUMBER = 1; + private boolean allowMultiLabel_; + /** + * + * + *
+   * Optional. If allow_multi_label is true, contributors are able to choose
+   * multiple labels for one text segment.
+   * 
+ * + * bool allow_multi_label = 1; + */ + public boolean getAllowMultiLabel() { + return allowMultiLabel_; + } + + public static final int ANNOTATION_SPEC_SET_FIELD_NUMBER = 2; + private volatile java.lang.Object annotationSpecSet_; + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 2; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 2; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SENTIMENT_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.datalabeling.v1beta1.SentimentConfig sentimentConfig_; + /** + * + * + *
+   * Optional. Configs for sentiment selection.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + public boolean hasSentimentConfig() { + return sentimentConfig_ != null; + } + /** + * + * + *
+   * Optional. Configs for sentiment selection.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + public com.google.cloud.datalabeling.v1beta1.SentimentConfig getSentimentConfig() { + return sentimentConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.SentimentConfig.getDefaultInstance() + : sentimentConfig_; + } + /** + * + * + *
+   * Optional. Configs for sentiment selection.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + public com.google.cloud.datalabeling.v1beta1.SentimentConfigOrBuilder + getSentimentConfigOrBuilder() { + return getSentimentConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (allowMultiLabel_ != false) { + output.writeBool(1, allowMultiLabel_); + } + if (!getAnnotationSpecSetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, annotationSpecSet_); + } + if (sentimentConfig_ != null) { + output.writeMessage(3, getSentimentConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (allowMultiLabel_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, allowMultiLabel_); + } + if (!getAnnotationSpecSetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, annotationSpecSet_); + } + if (sentimentConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSentimentConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.TextClassificationConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig other = + (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) obj; + + if (getAllowMultiLabel() != other.getAllowMultiLabel()) return false; + if (!getAnnotationSpecSet().equals(other.getAnnotationSpecSet())) return false; + if (hasSentimentConfig() != other.hasSentimentConfig()) return false; + if (hasSentimentConfig()) { + if (!getSentimentConfig().equals(other.getSentimentConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALLOW_MULTI_LABEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMultiLabel()); + hash = (37 * hash) + ANNOTATION_SPEC_SET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSet().hashCode(); + if (hasSentimentConfig()) { + hash = (37 * hash) + SENTIMENT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSentimentConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for text classification human labeling task.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.TextClassificationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.TextClassificationConfig) + com.google.cloud.datalabeling.v1beta1.TextClassificationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextClassificationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextClassificationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.class, + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + allowMultiLabel_ = false; + + annotationSpecSet_ = ""; + + if (sentimentConfigBuilder_ == null) { + sentimentConfig_ = null; + } else { + sentimentConfig_ = null; + sentimentConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextClassificationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfig + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfig build() { + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig result = + new com.google.cloud.datalabeling.v1beta1.TextClassificationConfig(this); + result.allowMultiLabel_ = allowMultiLabel_; + result.annotationSpecSet_ = annotationSpecSet_; + if (sentimentConfigBuilder_ == null) { + result.sentimentConfig_ = sentimentConfig_; + } else { + result.sentimentConfig_ = sentimentConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.TextClassificationConfig other) { + if (other + == com.google.cloud.datalabeling.v1beta1.TextClassificationConfig.getDefaultInstance()) + return this; + if (other.getAllowMultiLabel() != false) { + setAllowMultiLabel(other.getAllowMultiLabel()); + } + if (!other.getAnnotationSpecSet().isEmpty()) { + annotationSpecSet_ = other.annotationSpecSet_; + onChanged(); + } + if (other.hasSentimentConfig()) { + mergeSentimentConfig(other.getSentimentConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.TextClassificationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.TextClassificationConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean allowMultiLabel_; + /** + * + * + *
+     * Optional. If allow_multi_label is true, contributors are able to choose
+     * multiple labels for one text segment.
+     * 
+ * + * bool allow_multi_label = 1; + */ + public boolean getAllowMultiLabel() { + return allowMultiLabel_; + } + /** + * + * + *
+     * Optional. If allow_multi_label is true, contributors are able to choose
+     * multiple labels for one text segment.
+     * 
+ * + * bool allow_multi_label = 1; + */ + public Builder setAllowMultiLabel(boolean value) { + + allowMultiLabel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If allow_multi_label is true, contributors are able to choose
+     * multiple labels for one text segment.
+     * 
+ * + * bool allow_multi_label = 1; + */ + public Builder clearAllowMultiLabel() { + + allowMultiLabel_ = false; + onChanged(); + return this; + } + + private java.lang.Object annotationSpecSet_ = ""; + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 2; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 2; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 2; + */ + public Builder setAnnotationSpecSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSpecSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 2; + */ + public Builder clearAnnotationSpecSet() { + + annotationSpecSet_ = getDefaultInstance().getAnnotationSpecSet(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 2; + */ + public Builder setAnnotationSpecSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationSpecSet_ = value; + onChanged(); + return this; + } + + private com.google.cloud.datalabeling.v1beta1.SentimentConfig sentimentConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.SentimentConfig, + com.google.cloud.datalabeling.v1beta1.SentimentConfig.Builder, + com.google.cloud.datalabeling.v1beta1.SentimentConfigOrBuilder> + sentimentConfigBuilder_; + /** + * + * + *
+     * Optional. Configs for sentiment selection.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + public boolean hasSentimentConfig() { + return sentimentConfigBuilder_ != null || sentimentConfig_ != null; + } + /** + * + * + *
+     * Optional. Configs for sentiment selection.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + public com.google.cloud.datalabeling.v1beta1.SentimentConfig getSentimentConfig() { + if (sentimentConfigBuilder_ == null) { + return sentimentConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.SentimentConfig.getDefaultInstance() + : sentimentConfig_; + } else { + return sentimentConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configs for sentiment selection.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + public Builder setSentimentConfig(com.google.cloud.datalabeling.v1beta1.SentimentConfig value) { + if (sentimentConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sentimentConfig_ = value; + onChanged(); + } else { + sentimentConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configs for sentiment selection.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + public Builder setSentimentConfig( + com.google.cloud.datalabeling.v1beta1.SentimentConfig.Builder builderForValue) { + if (sentimentConfigBuilder_ == null) { + sentimentConfig_ = builderForValue.build(); + onChanged(); + } else { + sentimentConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Configs for sentiment selection.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + public Builder mergeSentimentConfig( + com.google.cloud.datalabeling.v1beta1.SentimentConfig value) { + if (sentimentConfigBuilder_ == null) { + if (sentimentConfig_ != null) { + sentimentConfig_ = + com.google.cloud.datalabeling.v1beta1.SentimentConfig.newBuilder(sentimentConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + sentimentConfig_ = value; + } + onChanged(); + } else { + sentimentConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Configs for sentiment selection.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + public Builder clearSentimentConfig() { + if (sentimentConfigBuilder_ == null) { + sentimentConfig_ = null; + onChanged(); + } else { + sentimentConfig_ = null; + sentimentConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Configs for sentiment selection.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + public com.google.cloud.datalabeling.v1beta1.SentimentConfig.Builder + getSentimentConfigBuilder() { + + onChanged(); + return getSentimentConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configs for sentiment selection.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + public com.google.cloud.datalabeling.v1beta1.SentimentConfigOrBuilder + getSentimentConfigOrBuilder() { + if (sentimentConfigBuilder_ != null) { + return sentimentConfigBuilder_.getMessageOrBuilder(); + } else { + return sentimentConfig_ == null + ? com.google.cloud.datalabeling.v1beta1.SentimentConfig.getDefaultInstance() + : sentimentConfig_; + } + } + /** + * + * + *
+     * Optional. Configs for sentiment selection.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.SentimentConfig, + com.google.cloud.datalabeling.v1beta1.SentimentConfig.Builder, + com.google.cloud.datalabeling.v1beta1.SentimentConfigOrBuilder> + getSentimentConfigFieldBuilder() { + if (sentimentConfigBuilder_ == null) { + sentimentConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.SentimentConfig, + com.google.cloud.datalabeling.v1beta1.SentimentConfig.Builder, + com.google.cloud.datalabeling.v1beta1.SentimentConfigOrBuilder>( + getSentimentConfig(), getParentForChildren(), isClean()); + sentimentConfig_ = null; + } + return sentimentConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.TextClassificationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.TextClassificationConfig) + private static final com.google.cloud.datalabeling.v1beta1.TextClassificationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.TextClassificationConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.TextClassificationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextClassificationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextClassificationConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextClassificationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationConfigOrBuilder.java new file mode 100644 index 000000000000..1c49a98cf21f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextClassificationConfigOrBuilder.java @@ -0,0 +1,74 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface TextClassificationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.TextClassificationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. If allow_multi_label is true, contributors are able to choose
+   * multiple labels for one text segment.
+   * 
+ * + * bool allow_multi_label = 1; + */ + boolean getAllowMultiLabel(); + + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 2; + */ + java.lang.String getAnnotationSpecSet(); + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 2; + */ + com.google.protobuf.ByteString getAnnotationSpecSetBytes(); + + /** + * + * + *
+   * Optional. Configs for sentiment selection.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + boolean hasSentimentConfig(); + /** + * + * + *
+   * Optional. Configs for sentiment selection.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + com.google.cloud.datalabeling.v1beta1.SentimentConfig getSentimentConfig(); + /** + * + * + *
+   * Optional. Configs for sentiment selection.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.SentimentConfig sentiment_config = 3; + */ + com.google.cloud.datalabeling.v1beta1.SentimentConfigOrBuilder getSentimentConfigOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextEntityExtractionConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextEntityExtractionConfig.java new file mode 100644 index 000000000000..bac7e3043a38 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextEntityExtractionConfig.java @@ -0,0 +1,606 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Config for text entity extraction human labeling task.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig} + */ +public final class TextEntityExtractionConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + TextEntityExtractionConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextEntityExtractionConfig.newBuilder() to construct. + private TextEntityExtractionConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextEntityExtractionConfig() { + annotationSpecSet_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextEntityExtractionConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationSpecSet_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextEntityExtractionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextEntityExtractionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.class, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder.class); + } + + public static final int ANNOTATION_SPEC_SET_FIELD_NUMBER = 1; + private volatile java.lang.Object annotationSpecSet_; + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAnnotationSpecSetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecSet_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAnnotationSpecSetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotationSpecSet_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig other = + (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) obj; + + if (!getAnnotationSpecSet().equals(other.getAnnotationSpecSet())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANNOTATION_SPEC_SET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSet().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for text entity extraction human labeling task.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextEntityExtractionConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextEntityExtractionConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.class, + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + annotationSpecSet_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextEntityExtractionConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig build() { + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig result = + new com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig(this); + result.annotationSpecSet_ = annotationSpecSet_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig other) { + if (other + == com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig.getDefaultInstance()) + return this; + if (!other.getAnnotationSpecSet().isEmpty()) { + annotationSpecSet_ = other.annotationSpecSet_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object annotationSpecSet_ = ""; + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSpecSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder clearAnnotationSpecSet() { + + annotationSpecSet_ = getDefaultInstance().getAnnotationSpecSet(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationSpecSet_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + private static final com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextEntityExtractionConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextEntityExtractionConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextEntityExtractionConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextEntityExtractionConfigOrBuilder.java new file mode 100644 index 000000000000..07807ae2e674 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextEntityExtractionConfigOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface TextEntityExtractionConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.TextEntityExtractionConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + java.lang.String getAnnotationSpecSet(); + /** + * + * + *
+   * Required. Annotation spec set resource name.
+   * 
+ * + * string annotation_spec_set = 1; + */ + com.google.protobuf.ByteString getAnnotationSpecSetBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextPayload.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextPayload.java new file mode 100644 index 000000000000..d057d9ee8ac4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextPayload.java @@ -0,0 +1,598 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Container of information about a piece of text.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.TextPayload} + */ +public final class TextPayload extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.TextPayload) + TextPayloadOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPayload.newBuilder() to construct. + private TextPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TextPayload() { + textContent_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TextPayload( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + textContent_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextPayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextPayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.TextPayload.class, + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder.class); + } + + public static final int TEXT_CONTENT_FIELD_NUMBER = 1; + private volatile java.lang.Object textContent_; + /** + * + * + *
+   * Text content.
+   * 
+ * + * string text_content = 1; + */ + public java.lang.String getTextContent() { + java.lang.Object ref = textContent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + textContent_ = s; + return s; + } + } + /** + * + * + *
+   * Text content.
+   * 
+ * + * string text_content = 1; + */ + public com.google.protobuf.ByteString getTextContentBytes() { + java.lang.Object ref = textContent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + textContent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getTextContentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, textContent_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTextContentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, textContent_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.TextPayload)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.TextPayload other = + (com.google.cloud.datalabeling.v1beta1.TextPayload) obj; + + if (!getTextContent().equals(other.getTextContent())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TEXT_CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getTextContent().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.TextPayload prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Container of information about a piece of text.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.TextPayload} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.TextPayload) + com.google.cloud.datalabeling.v1beta1.TextPayloadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextPayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextPayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.TextPayload.class, + com.google.cloud.datalabeling.v1beta1.TextPayload.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.TextPayload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + textContent_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TextPayload_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextPayload getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextPayload build() { + com.google.cloud.datalabeling.v1beta1.TextPayload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextPayload buildPartial() { + com.google.cloud.datalabeling.v1beta1.TextPayload result = + new com.google.cloud.datalabeling.v1beta1.TextPayload(this); + result.textContent_ = textContent_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.TextPayload) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.TextPayload) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.TextPayload other) { + if (other == com.google.cloud.datalabeling.v1beta1.TextPayload.getDefaultInstance()) + return this; + if (!other.getTextContent().isEmpty()) { + textContent_ = other.textContent_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.TextPayload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.TextPayload) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object textContent_ = ""; + /** + * + * + *
+     * Text content.
+     * 
+ * + * string text_content = 1; + */ + public java.lang.String getTextContent() { + java.lang.Object ref = textContent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + textContent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Text content.
+     * 
+ * + * string text_content = 1; + */ + public com.google.protobuf.ByteString getTextContentBytes() { + java.lang.Object ref = textContent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + textContent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Text content.
+     * 
+ * + * string text_content = 1; + */ + public Builder setTextContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + textContent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Text content.
+     * 
+ * + * string text_content = 1; + */ + public Builder clearTextContent() { + + textContent_ = getDefaultInstance().getTextContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Text content.
+     * 
+ * + * string text_content = 1; + */ + public Builder setTextContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + textContent_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.TextPayload) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.TextPayload) + private static final com.google.cloud.datalabeling.v1beta1.TextPayload DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.TextPayload(); + } + + public static com.google.cloud.datalabeling.v1beta1.TextPayload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TextPayload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TextPayload(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TextPayload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextPayloadOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextPayloadOrBuilder.java new file mode 100644 index 000000000000..35e64020a4bc --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TextPayloadOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface TextPayloadOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.TextPayload) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Text content.
+   * 
+ * + * string text_content = 1; + */ + java.lang.String getTextContent(); + /** + * + * + *
+   * Text content.
+   * 
+ * + * string text_content = 1; + */ + com.google.protobuf.ByteString getTextContentBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TimeSegment.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TimeSegment.java new file mode 100644 index 000000000000..65529063f5d4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TimeSegment.java @@ -0,0 +1,990 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * A time period inside of an example that has a time dimension (e.g. video).
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.TimeSegment} + */ +public final class TimeSegment extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.TimeSegment) + TimeSegmentOrBuilder { + private static final long serialVersionUID = 0L; + // Use TimeSegment.newBuilder() to construct. + private TimeSegment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TimeSegment() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TimeSegment( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (startTimeOffset_ != null) { + subBuilder = startTimeOffset_.toBuilder(); + } + startTimeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTimeOffset_); + startTimeOffset_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (endTimeOffset_ != null) { + subBuilder = endTimeOffset_.toBuilder(); + } + endTimeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTimeOffset_); + endTimeOffset_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TimeSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TimeSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.TimeSegment.class, + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder.class); + } + + public static final int START_TIME_OFFSET_FIELD_NUMBER = 1; + private com.google.protobuf.Duration startTimeOffset_; + /** + * + * + *
+   * Start of the time segment (inclusive), represented as the duration since
+   * the example start.
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public boolean hasStartTimeOffset() { + return startTimeOffset_ != null; + } + /** + * + * + *
+   * Start of the time segment (inclusive), represented as the duration since
+   * the example start.
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public com.google.protobuf.Duration getStartTimeOffset() { + return startTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startTimeOffset_; + } + /** + * + * + *
+   * Start of the time segment (inclusive), represented as the duration since
+   * the example start.
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public com.google.protobuf.DurationOrBuilder getStartTimeOffsetOrBuilder() { + return getStartTimeOffset(); + } + + public static final int END_TIME_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration endTimeOffset_; + /** + * + * + *
+   * End of the time segment (exclusive), represented as the duration since the
+   * example start.
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public boolean hasEndTimeOffset() { + return endTimeOffset_ != null; + } + /** + * + * + *
+   * End of the time segment (exclusive), represented as the duration since the
+   * example start.
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public com.google.protobuf.Duration getEndTimeOffset() { + return endTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endTimeOffset_; + } + /** + * + * + *
+   * End of the time segment (exclusive), represented as the duration since the
+   * example start.
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getEndTimeOffsetOrBuilder() { + return getEndTimeOffset(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (startTimeOffset_ != null) { + output.writeMessage(1, getStartTimeOffset()); + } + if (endTimeOffset_ != null) { + output.writeMessage(2, getEndTimeOffset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTimeOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTimeOffset()); + } + if (endTimeOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTimeOffset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.TimeSegment)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.TimeSegment other = + (com.google.cloud.datalabeling.v1beta1.TimeSegment) obj; + + if (hasStartTimeOffset() != other.hasStartTimeOffset()) return false; + if (hasStartTimeOffset()) { + if (!getStartTimeOffset().equals(other.getStartTimeOffset())) return false; + } + if (hasEndTimeOffset() != other.hasEndTimeOffset()) return false; + if (hasEndTimeOffset()) { + if (!getEndTimeOffset().equals(other.getEndTimeOffset())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTimeOffset()) { + hash = (37 * hash) + START_TIME_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getStartTimeOffset().hashCode(); + } + if (hasEndTimeOffset()) { + hash = (37 * hash) + END_TIME_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getEndTimeOffset().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.TimeSegment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A time period inside of an example that has a time dimension (e.g. video).
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.TimeSegment} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.TimeSegment) + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TimeSegment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TimeSegment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.TimeSegment.class, + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.TimeSegment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (startTimeOffsetBuilder_ == null) { + startTimeOffset_ = null; + } else { + startTimeOffset_ = null; + startTimeOffsetBuilder_ = null; + } + if (endTimeOffsetBuilder_ == null) { + endTimeOffset_ = null; + } else { + endTimeOffset_ = null; + endTimeOffsetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_TimeSegment_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TimeSegment getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.TimeSegment.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TimeSegment build() { + com.google.cloud.datalabeling.v1beta1.TimeSegment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TimeSegment buildPartial() { + com.google.cloud.datalabeling.v1beta1.TimeSegment result = + new com.google.cloud.datalabeling.v1beta1.TimeSegment(this); + if (startTimeOffsetBuilder_ == null) { + result.startTimeOffset_ = startTimeOffset_; + } else { + result.startTimeOffset_ = startTimeOffsetBuilder_.build(); + } + if (endTimeOffsetBuilder_ == null) { + result.endTimeOffset_ = endTimeOffset_; + } else { + result.endTimeOffset_ = endTimeOffsetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.TimeSegment) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.TimeSegment) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.TimeSegment other) { + if (other == com.google.cloud.datalabeling.v1beta1.TimeSegment.getDefaultInstance()) + return this; + if (other.hasStartTimeOffset()) { + mergeStartTimeOffset(other.getStartTimeOffset()); + } + if (other.hasEndTimeOffset()) { + mergeEndTimeOffset(other.getEndTimeOffset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.TimeSegment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.TimeSegment) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Duration startTimeOffset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + startTimeOffsetBuilder_; + /** + * + * + *
+     * Start of the time segment (inclusive), represented as the duration since
+     * the example start.
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public boolean hasStartTimeOffset() { + return startTimeOffsetBuilder_ != null || startTimeOffset_ != null; + } + /** + * + * + *
+     * Start of the time segment (inclusive), represented as the duration since
+     * the example start.
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public com.google.protobuf.Duration getStartTimeOffset() { + if (startTimeOffsetBuilder_ == null) { + return startTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startTimeOffset_; + } else { + return startTimeOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Start of the time segment (inclusive), represented as the duration since
+     * the example start.
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public Builder setStartTimeOffset(com.google.protobuf.Duration value) { + if (startTimeOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimeOffset_ = value; + onChanged(); + } else { + startTimeOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Start of the time segment (inclusive), represented as the duration since
+     * the example start.
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public Builder setStartTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (startTimeOffsetBuilder_ == null) { + startTimeOffset_ = builderForValue.build(); + onChanged(); + } else { + startTimeOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Start of the time segment (inclusive), represented as the duration since
+     * the example start.
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public Builder mergeStartTimeOffset(com.google.protobuf.Duration value) { + if (startTimeOffsetBuilder_ == null) { + if (startTimeOffset_ != null) { + startTimeOffset_ = + com.google.protobuf.Duration.newBuilder(startTimeOffset_) + .mergeFrom(value) + .buildPartial(); + } else { + startTimeOffset_ = value; + } + onChanged(); + } else { + startTimeOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Start of the time segment (inclusive), represented as the duration since
+     * the example start.
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public Builder clearStartTimeOffset() { + if (startTimeOffsetBuilder_ == null) { + startTimeOffset_ = null; + onChanged(); + } else { + startTimeOffset_ = null; + startTimeOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Start of the time segment (inclusive), represented as the duration since
+     * the example start.
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public com.google.protobuf.Duration.Builder getStartTimeOffsetBuilder() { + + onChanged(); + return getStartTimeOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Start of the time segment (inclusive), represented as the duration since
+     * the example start.
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + public com.google.protobuf.DurationOrBuilder getStartTimeOffsetOrBuilder() { + if (startTimeOffsetBuilder_ != null) { + return startTimeOffsetBuilder_.getMessageOrBuilder(); + } else { + return startTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : startTimeOffset_; + } + } + /** + * + * + *
+     * Start of the time segment (inclusive), represented as the duration since
+     * the example start.
+     * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getStartTimeOffsetFieldBuilder() { + if (startTimeOffsetBuilder_ == null) { + startTimeOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getStartTimeOffset(), getParentForChildren(), isClean()); + startTimeOffset_ = null; + } + return startTimeOffsetBuilder_; + } + + private com.google.protobuf.Duration endTimeOffset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + endTimeOffsetBuilder_; + /** + * + * + *
+     * End of the time segment (exclusive), represented as the duration since the
+     * example start.
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public boolean hasEndTimeOffset() { + return endTimeOffsetBuilder_ != null || endTimeOffset_ != null; + } + /** + * + * + *
+     * End of the time segment (exclusive), represented as the duration since the
+     * example start.
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public com.google.protobuf.Duration getEndTimeOffset() { + if (endTimeOffsetBuilder_ == null) { + return endTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endTimeOffset_; + } else { + return endTimeOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * End of the time segment (exclusive), represented as the duration since the
+     * example start.
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public Builder setEndTimeOffset(com.google.protobuf.Duration value) { + if (endTimeOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTimeOffset_ = value; + onChanged(); + } else { + endTimeOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * End of the time segment (exclusive), represented as the duration since the
+     * example start.
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public Builder setEndTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (endTimeOffsetBuilder_ == null) { + endTimeOffset_ = builderForValue.build(); + onChanged(); + } else { + endTimeOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * End of the time segment (exclusive), represented as the duration since the
+     * example start.
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public Builder mergeEndTimeOffset(com.google.protobuf.Duration value) { + if (endTimeOffsetBuilder_ == null) { + if (endTimeOffset_ != null) { + endTimeOffset_ = + com.google.protobuf.Duration.newBuilder(endTimeOffset_) + .mergeFrom(value) + .buildPartial(); + } else { + endTimeOffset_ = value; + } + onChanged(); + } else { + endTimeOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * End of the time segment (exclusive), represented as the duration since the
+     * example start.
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public Builder clearEndTimeOffset() { + if (endTimeOffsetBuilder_ == null) { + endTimeOffset_ = null; + onChanged(); + } else { + endTimeOffset_ = null; + endTimeOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * End of the time segment (exclusive), represented as the duration since the
+     * example start.
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public com.google.protobuf.Duration.Builder getEndTimeOffsetBuilder() { + + onChanged(); + return getEndTimeOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * End of the time segment (exclusive), represented as the duration since the
+     * example start.
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getEndTimeOffsetOrBuilder() { + if (endTimeOffsetBuilder_ != null) { + return endTimeOffsetBuilder_.getMessageOrBuilder(); + } else { + return endTimeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : endTimeOffset_; + } + } + /** + * + * + *
+     * End of the time segment (exclusive), represented as the duration since the
+     * example start.
+     * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getEndTimeOffsetFieldBuilder() { + if (endTimeOffsetBuilder_ == null) { + endTimeOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getEndTimeOffset(), getParentForChildren(), isClean()); + endTimeOffset_ = null; + } + return endTimeOffsetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.TimeSegment) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.TimeSegment) + private static final com.google.cloud.datalabeling.v1beta1.TimeSegment DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.TimeSegment(); + } + + public static com.google.cloud.datalabeling.v1beta1.TimeSegment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TimeSegment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TimeSegment(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.TimeSegment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TimeSegmentOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TimeSegmentOrBuilder.java new file mode 100644 index 000000000000..83f8ad891634 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/TimeSegmentOrBuilder.java @@ -0,0 +1,78 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface TimeSegmentOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.TimeSegment) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Start of the time segment (inclusive), represented as the duration since
+   * the example start.
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + boolean hasStartTimeOffset(); + /** + * + * + *
+   * Start of the time segment (inclusive), represented as the duration since
+   * the example start.
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + com.google.protobuf.Duration getStartTimeOffset(); + /** + * + * + *
+   * Start of the time segment (inclusive), represented as the duration since
+   * the example start.
+   * 
+ * + * .google.protobuf.Duration start_time_offset = 1; + */ + com.google.protobuf.DurationOrBuilder getStartTimeOffsetOrBuilder(); + + /** + * + * + *
+   * End of the time segment (exclusive), represented as the duration since the
+   * example start.
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + boolean hasEndTimeOffset(); + /** + * + * + *
+   * End of the time segment (exclusive), represented as the duration since the
+   * example start.
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + com.google.protobuf.Duration getEndTimeOffset(); + /** + * + * + *
+   * End of the time segment (exclusive), represented as the duration since the
+   * example start.
+   * 
+ * + * .google.protobuf.Duration end_time_offset = 2; + */ + com.google.protobuf.DurationOrBuilder getEndTimeOffsetOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Vertex.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Vertex.java new file mode 100644 index 000000000000..eaee590e1324 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/Vertex.java @@ -0,0 +1,594 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * A vertex represents a 2D point in the image.
+ * NOTE: the vertex coordinates are in the same scale as the original image.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Vertex} + */ +public final class Vertex extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.Vertex) + VertexOrBuilder { + private static final long serialVersionUID = 0L; + // Use Vertex.newBuilder() to construct. + private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Vertex() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Vertex( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + x_ = input.readInt32(); + break; + } + case 16: + { + y_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Vertex.class, + com.google.cloud.datalabeling.v1beta1.Vertex.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private int x_; + /** + * + * + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + */ + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private int y_; + /** + * + * + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + */ + public int getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (x_ != 0) { + output.writeInt32(1, x_); + } + if (y_ != 0) { + output.writeInt32(2, y_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, y_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.Vertex)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.Vertex other = + (com.google.cloud.datalabeling.v1beta1.Vertex) obj; + + if (getX() != other.getX()) return false; + if (getY() != other.getY()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.Vertex prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A vertex represents a 2D point in the image.
+   * NOTE: the vertex coordinates are in the same scale as the original image.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.Vertex} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.Vertex) + com.google.cloud.datalabeling.v1beta1.VertexOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Vertex_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Vertex_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.Vertex.class, + com.google.cloud.datalabeling.v1beta1.Vertex.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.Vertex.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + x_ = 0; + + y_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_Vertex_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Vertex getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.Vertex.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Vertex build() { + com.google.cloud.datalabeling.v1beta1.Vertex result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Vertex buildPartial() { + com.google.cloud.datalabeling.v1beta1.Vertex result = + new com.google.cloud.datalabeling.v1beta1.Vertex(this); + result.x_ = x_; + result.y_ = y_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.Vertex) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.Vertex) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.Vertex other) { + if (other == com.google.cloud.datalabeling.v1beta1.Vertex.getDefaultInstance()) return this; + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.Vertex parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.datalabeling.v1beta1.Vertex) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int x_; + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + */ + public int getX() { + return x_; + } + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + */ + public Builder setX(int value) { + + x_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * X coordinate.
+     * 
+ * + * int32 x = 1; + */ + public Builder clearX() { + + x_ = 0; + onChanged(); + return this; + } + + private int y_; + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + */ + public int getY() { + return y_; + } + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + */ + public Builder setY(int value) { + + y_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Y coordinate.
+     * 
+ * + * int32 y = 2; + */ + public Builder clearY() { + + y_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.Vertex) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.Vertex) + private static final com.google.cloud.datalabeling.v1beta1.Vertex DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.Vertex(); + } + + public static com.google.cloud.datalabeling.v1beta1.Vertex getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Vertex parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Vertex(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.Vertex getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VertexOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VertexOrBuilder.java new file mode 100644 index 000000000000..8df4c79c3ad1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VertexOrBuilder.java @@ -0,0 +1,32 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface VertexOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.Vertex) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * X coordinate.
+   * 
+ * + * int32 x = 1; + */ + int getX(); + + /** + * + * + *
+   * Y coordinate.
+   * 
+ * + * int32 y = 2; + */ + int getY(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationAnnotation.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationAnnotation.java new file mode 100644 index 000000000000..23857021b449 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationAnnotation.java @@ -0,0 +1,986 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Video classification annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} + */ +public final class VideoClassificationAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) + VideoClassificationAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoClassificationAnnotation.newBuilder() to construct. + private VideoClassificationAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoClassificationAnnotation() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoClassificationAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder subBuilder = null; + if (timeSegment_ != null) { + subBuilder = timeSegment_.toBuilder(); + } + timeSegment_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.TimeSegment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeSegment_); + timeSegment_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder subBuilder = null; + if (annotationSpec_ != null) { + subBuilder = annotationSpec_.toBuilder(); + } + annotationSpec_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationSpec_); + annotationSpec_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.class, + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.Builder.class); + } + + public static final int TIME_SEGMENT_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.TimeSegment timeSegment_; + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + public boolean hasTimeSegment() { + return timeSegment_ != null; + } + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegment getTimeSegment() { + return timeSegment_ == null + ? com.google.cloud.datalabeling.v1beta1.TimeSegment.getDefaultInstance() + : timeSegment_; + } + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder() { + return getTimeSegment(); + } + + public static final int ANNOTATION_SPEC_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + /** + * + * + *
+   * Label of the segment specified by time_segment.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + public boolean hasAnnotationSpec() { + return annotationSpec_ != null; + } + /** + * + * + *
+   * Label of the segment specified by time_segment.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + /** + * + * + *
+   * Label of the segment specified by time_segment.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + return getAnnotationSpec(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (timeSegment_ != null) { + output.writeMessage(1, getTimeSegment()); + } + if (annotationSpec_ != null) { + output.writeMessage(2, getAnnotationSpec()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timeSegment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimeSegment()); + } + if (annotationSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAnnotationSpec()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation other = + (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) obj; + + if (hasTimeSegment() != other.hasTimeSegment()) return false; + if (hasTimeSegment()) { + if (!getTimeSegment().equals(other.getTimeSegment())) return false; + } + if (hasAnnotationSpec() != other.hasAnnotationSpec()) return false; + if (hasAnnotationSpec()) { + if (!getAnnotationSpec().equals(other.getAnnotationSpec())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTimeSegment()) { + hash = (37 * hash) + TIME_SEGMENT_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegment().hashCode(); + } + if (hasAnnotationSpec()) { + hash = (37 * hash) + ANNOTATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpec().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video classification annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.class, + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (timeSegmentBuilder_ == null) { + timeSegment_ = null; + } else { + timeSegment_ = null; + timeSegmentBuilder_ = null; + } + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation build() { + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation buildPartial() { + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation result = + new com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation(this); + if (timeSegmentBuilder_ == null) { + result.timeSegment_ = timeSegment_; + } else { + result.timeSegment_ = timeSegmentBuilder_.build(); + } + if (annotationSpecBuilder_ == null) { + result.annotationSpec_ = annotationSpec_; + } else { + result.annotationSpec_ = annotationSpecBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation other) { + if (other + == com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + .getDefaultInstance()) return this; + if (other.hasTimeSegment()) { + mergeTimeSegment(other.getTimeSegment()); + } + if (other.hasAnnotationSpec()) { + mergeAnnotationSpec(other.getAnnotationSpec()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.TimeSegment timeSegment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TimeSegment, + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder, + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder> + timeSegmentBuilder_; + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + public boolean hasTimeSegment() { + return timeSegmentBuilder_ != null || timeSegment_ != null; + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegment getTimeSegment() { + if (timeSegmentBuilder_ == null) { + return timeSegment_ == null + ? com.google.cloud.datalabeling.v1beta1.TimeSegment.getDefaultInstance() + : timeSegment_; + } else { + return timeSegmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + public Builder setTimeSegment(com.google.cloud.datalabeling.v1beta1.TimeSegment value) { + if (timeSegmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSegment_ = value; + onChanged(); + } else { + timeSegmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + public Builder setTimeSegment( + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder builderForValue) { + if (timeSegmentBuilder_ == null) { + timeSegment_ = builderForValue.build(); + onChanged(); + } else { + timeSegmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + public Builder mergeTimeSegment(com.google.cloud.datalabeling.v1beta1.TimeSegment value) { + if (timeSegmentBuilder_ == null) { + if (timeSegment_ != null) { + timeSegment_ = + com.google.cloud.datalabeling.v1beta1.TimeSegment.newBuilder(timeSegment_) + .mergeFrom(value) + .buildPartial(); + } else { + timeSegment_ = value; + } + onChanged(); + } else { + timeSegmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + public Builder clearTimeSegment() { + if (timeSegmentBuilder_ == null) { + timeSegment_ = null; + onChanged(); + } else { + timeSegment_ = null; + timeSegmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder getTimeSegmentBuilder() { + + onChanged(); + return getTimeSegmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder() { + if (timeSegmentBuilder_ != null) { + return timeSegmentBuilder_.getMessageOrBuilder(); + } else { + return timeSegment_ == null + ? com.google.cloud.datalabeling.v1beta1.TimeSegment.getDefaultInstance() + : timeSegment_; + } + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TimeSegment, + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder, + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder> + getTimeSegmentFieldBuilder() { + if (timeSegmentBuilder_ == null) { + timeSegmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TimeSegment, + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder, + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder>( + getTimeSegment(), getParentForChildren(), isClean()); + timeSegment_ = null; + } + return timeSegmentBuilder_; + } + + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + annotationSpecBuilder_; + /** + * + * + *
+     * Label of the segment specified by time_segment.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + public boolean hasAnnotationSpec() { + return annotationSpecBuilder_ != null || annotationSpec_ != null; + } + /** + * + * + *
+     * Label of the segment specified by time_segment.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } else { + return annotationSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Label of the segment specified by time_segment.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + public Builder setAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationSpec_ = value; + onChanged(); + } else { + annotationSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Label of the segment specified by time_segment.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + public Builder setAnnotationSpec( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder builderForValue) { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = builderForValue.build(); + onChanged(); + } else { + annotationSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Label of the segment specified by time_segment.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + public Builder mergeAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (annotationSpec_ != null) { + annotationSpec_ = + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.newBuilder(annotationSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationSpec_ = value; + } + onChanged(); + } else { + annotationSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Label of the segment specified by time_segment.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + public Builder clearAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + onChanged(); + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Label of the segment specified by time_segment.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder getAnnotationSpecBuilder() { + + onChanged(); + return getAnnotationSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Label of the segment specified by time_segment.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + if (annotationSpecBuilder_ != null) { + return annotationSpecBuilder_.getMessageOrBuilder(); + } else { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + } + /** + * + * + *
+     * Label of the segment specified by time_segment.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + getAnnotationSpecFieldBuilder() { + if (annotationSpecBuilder_ == null) { + annotationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>( + getAnnotationSpec(), getParentForChildren(), isClean()); + annotationSpec_ = null; + } + return annotationSpecBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) + private static final com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation(); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoClassificationAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoClassificationAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationAnnotationOrBuilder.java new file mode 100644 index 000000000000..063c6435e432 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationAnnotationOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface VideoClassificationAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + boolean hasTimeSegment(); + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + com.google.cloud.datalabeling.v1beta1.TimeSegment getTimeSegment(); + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 1; + */ + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder(); + + /** + * + * + *
+   * Label of the segment specified by time_segment.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + boolean hasAnnotationSpec(); + /** + * + * + *
+   * Label of the segment specified by time_segment.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec(); + /** + * + * + *
+   * Label of the segment specified by time_segment.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 2; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder getAnnotationSpecOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationConfig.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationConfig.java new file mode 100644 index 000000000000..deb9e3a65899 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationConfig.java @@ -0,0 +1,2038 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Config for video classification human labeling task.
+ * Currently two types of video classification are supported:
+ * 1. Assign labels on the entire video.
+ * 2. Split the video into multiple video clips based on camera shot, and
+ * assign labels on each video clip.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoClassificationConfig} + */ +public final class VideoClassificationConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + VideoClassificationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoClassificationConfig.newBuilder() to construct. + private VideoClassificationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoClassificationConfig() { + annotationSpecSetConfigs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoClassificationConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + annotationSpecSetConfigs_ = + new java.util.ArrayList< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig>(); + mutable_bitField0_ |= 0x00000001; + } + annotationSpecSetConfigs_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig.parser(), + extensionRegistry)); + break; + } + case 16: + { + applyShotDetection_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + annotationSpecSetConfigs_ = + java.util.Collections.unmodifiableList(annotationSpecSetConfigs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.class, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder.class); + } + + public interface AnnotationSpecSetConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + java.lang.String getAnnotationSpecSet(); + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + com.google.protobuf.ByteString getAnnotationSpecSetBytes(); + + /** + * + * + *
+     * Optional. If allow_multi_label is true, contributors are able to
+     * choose multiple labels from one annotation spec set.
+     * 
+ * + * bool allow_multi_label = 2; + */ + boolean getAllowMultiLabel(); + } + /** + * + * + *
+   * Annotation spec set with the setting of allowing multi labels or not.
+   * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig} + */ + public static final class AnnotationSpecSetConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig) + AnnotationSpecSetConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnnotationSpecSetConfig.newBuilder() to construct. + private AnnotationSpecSetConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnnotationSpecSetConfig() { + annotationSpecSet_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnnotationSpecSetConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + annotationSpecSet_ = s; + break; + } + case 16: + { + allowMultiLabel_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_AnnotationSpecSetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_AnnotationSpecSetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig.class, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig.Builder.class); + } + + public static final int ANNOTATION_SPEC_SET_FIELD_NUMBER = 1; + private volatile java.lang.Object annotationSpecSet_; + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Annotation spec set resource name.
+     * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOW_MULTI_LABEL_FIELD_NUMBER = 2; + private boolean allowMultiLabel_; + /** + * + * + *
+     * Optional. If allow_multi_label is true, contributors are able to
+     * choose multiple labels from one annotation spec set.
+     * 
+ * + * bool allow_multi_label = 2; + */ + public boolean getAllowMultiLabel() { + return allowMultiLabel_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAnnotationSpecSetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecSet_); + } + if (allowMultiLabel_ != false) { + output.writeBool(2, allowMultiLabel_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAnnotationSpecSetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotationSpecSet_); + } + if (allowMultiLabel_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowMultiLabel_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + other = + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig) + obj; + + if (!getAnnotationSpecSet().equals(other.getAnnotationSpecSet())) return false; + if (getAllowMultiLabel() != other.getAllowMultiLabel()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANNOTATION_SPEC_SET_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSet().hashCode(); + hash = (37 * hash) + ALLOW_MULTI_LABEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMultiLabel()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Annotation spec set with the setting of allowing multi labels or not.
+     * 
+ * + * Protobuf type {@code + * google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig) + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_AnnotationSpecSetConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_AnnotationSpecSetConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig.class, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + annotationSpecSet_ = ""; + + allowMultiLabel_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_AnnotationSpecSetConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + build() { + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + buildPartial() { + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + result = + new com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig(this); + result.annotationSpecSet_ = annotationSpecSet_; + result.allowMultiLabel_ = allowMultiLabel_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + other) { + if (other + == com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig.getDefaultInstance()) return this; + if (!other.getAnnotationSpecSet().isEmpty()) { + annotationSpecSet_ = other.annotationSpecSet_; + onChanged(); + } + if (other.getAllowMultiLabel() != false) { + setAllowMultiLabel(other.getAllowMultiLabel()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object annotationSpecSet_ = ""; + /** + * + * + *
+       * Required. Annotation spec set resource name.
+       * 
+ * + * string annotation_spec_set = 1; + */ + public java.lang.String getAnnotationSpecSet() { + java.lang.Object ref = annotationSpecSet_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + annotationSpecSet_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Annotation spec set resource name.
+       * 
+ * + * string annotation_spec_set = 1; + */ + public com.google.protobuf.ByteString getAnnotationSpecSetBytes() { + java.lang.Object ref = annotationSpecSet_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + annotationSpecSet_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Annotation spec set resource name.
+       * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSet(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + annotationSpecSet_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Annotation spec set resource name.
+       * 
+ * + * string annotation_spec_set = 1; + */ + public Builder clearAnnotationSpecSet() { + + annotationSpecSet_ = getDefaultInstance().getAnnotationSpecSet(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Annotation spec set resource name.
+       * 
+ * + * string annotation_spec_set = 1; + */ + public Builder setAnnotationSpecSetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + annotationSpecSet_ = value; + onChanged(); + return this; + } + + private boolean allowMultiLabel_; + /** + * + * + *
+       * Optional. If allow_multi_label is true, contributors are able to
+       * choose multiple labels from one annotation spec set.
+       * 
+ * + * bool allow_multi_label = 2; + */ + public boolean getAllowMultiLabel() { + return allowMultiLabel_; + } + /** + * + * + *
+       * Optional. If allow_multi_label is true, contributors are able to
+       * choose multiple labels from one annotation spec set.
+       * 
+ * + * bool allow_multi_label = 2; + */ + public Builder setAllowMultiLabel(boolean value) { + + allowMultiLabel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If allow_multi_label is true, contributors are able to
+       * choose multiple labels from one annotation spec set.
+       * 
+ * + * bool allow_multi_label = 2; + */ + public Builder clearAllowMultiLabel() { + + allowMultiLabel_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig) + private static final com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnnotationSpecSetConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnnotationSpecSetConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int ANNOTATION_SPEC_SET_CONFIGS_FIELD_NUMBER = 1; + private java.util.List< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig> + annotationSpecSetConfigs_; + /** + * + * + *
+   * Required. The list of annotation spec set configs.
+   * Since watching a video clip takes much longer time than an image, we
+   * support label with multiple AnnotationSpecSet at the same time. Labels
+   * in each AnnotationSpecSet will be shown in a group to contributors.
+   * Contributors can select one or more (depending on whether to allow multi
+   * label) from each group.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public java.util.List< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig> + getAnnotationSpecSetConfigsList() { + return annotationSpecSetConfigs_; + } + /** + * + * + *
+   * Required. The list of annotation spec set configs.
+   * Since watching a video clip takes much longer time than an image, we
+   * support label with multiple AnnotationSpecSet at the same time. Labels
+   * in each AnnotationSpecSet will be shown in a group to contributors.
+   * Contributors can select one or more (depending on whether to allow multi
+   * label) from each group.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfigOrBuilder> + getAnnotationSpecSetConfigsOrBuilderList() { + return annotationSpecSetConfigs_; + } + /** + * + * + *
+   * Required. The list of annotation spec set configs.
+   * Since watching a video clip takes much longer time than an image, we
+   * support label with multiple AnnotationSpecSet at the same time. Labels
+   * in each AnnotationSpecSet will be shown in a group to contributors.
+   * Contributors can select one or more (depending on whether to allow multi
+   * label) from each group.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public int getAnnotationSpecSetConfigsCount() { + return annotationSpecSetConfigs_.size(); + } + /** + * + * + *
+   * Required. The list of annotation spec set configs.
+   * Since watching a video clip takes much longer time than an image, we
+   * support label with multiple AnnotationSpecSet at the same time. Labels
+   * in each AnnotationSpecSet will be shown in a group to contributors.
+   * Contributors can select one or more (depending on whether to allow multi
+   * label) from each group.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + getAnnotationSpecSetConfigs(int index) { + return annotationSpecSetConfigs_.get(index); + } + /** + * + * + *
+   * Required. The list of annotation spec set configs.
+   * Since watching a video clip takes much longer time than an image, we
+   * support label with multiple AnnotationSpecSet at the same time. Labels
+   * in each AnnotationSpecSet will be shown in a group to contributors.
+   * Contributors can select one or more (depending on whether to allow multi
+   * label) from each group.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfigOrBuilder + getAnnotationSpecSetConfigsOrBuilder(int index) { + return annotationSpecSetConfigs_.get(index); + } + + public static final int APPLY_SHOT_DETECTION_FIELD_NUMBER = 2; + private boolean applyShotDetection_; + /** + * + * + *
+   * Optional. Option to apply shot detection on the video.
+   * 
+ * + * bool apply_shot_detection = 2; + */ + public boolean getApplyShotDetection() { + return applyShotDetection_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < annotationSpecSetConfigs_.size(); i++) { + output.writeMessage(1, annotationSpecSetConfigs_.get(i)); + } + if (applyShotDetection_ != false) { + output.writeBool(2, applyShotDetection_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < annotationSpecSetConfigs_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, annotationSpecSetConfigs_.get(i)); + } + if (applyShotDetection_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, applyShotDetection_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig other = + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) obj; + + if (!getAnnotationSpecSetConfigsList().equals(other.getAnnotationSpecSetConfigsList())) + return false; + if (getApplyShotDetection() != other.getApplyShotDetection()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAnnotationSpecSetConfigsCount() > 0) { + hash = (37 * hash) + ANNOTATION_SPEC_SET_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpecSetConfigsList().hashCode(); + } + hash = (37 * hash) + APPLY_SHOT_DETECTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getApplyShotDetection()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Config for video classification human labeling task.
+   * Currently two types of video classification are supported:
+   * 1. Assign labels on the entire video.
+   * 2. Split the video into multiple video clips based on camera shot, and
+   * assign labels on each video clip.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoClassificationConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.class, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnnotationSpecSetConfigsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotationSpecSetConfigsBuilder_ == null) { + annotationSpecSetConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + annotationSpecSetConfigsBuilder_.clear(); + } + applyShotDetection_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.HumanAnnotationConfigOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoClassificationConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig build() { + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig buildPartial() { + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig result = + new com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (annotationSpecSetConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + annotationSpecSetConfigs_ = + java.util.Collections.unmodifiableList(annotationSpecSetConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.annotationSpecSetConfigs_ = annotationSpecSetConfigs_; + } else { + result.annotationSpecSetConfigs_ = annotationSpecSetConfigsBuilder_.build(); + } + result.applyShotDetection_ = applyShotDetection_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig other) { + if (other + == com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.getDefaultInstance()) + return this; + if (annotationSpecSetConfigsBuilder_ == null) { + if (!other.annotationSpecSetConfigs_.isEmpty()) { + if (annotationSpecSetConfigs_.isEmpty()) { + annotationSpecSetConfigs_ = other.annotationSpecSetConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnnotationSpecSetConfigsIsMutable(); + annotationSpecSetConfigs_.addAll(other.annotationSpecSetConfigs_); + } + onChanged(); + } + } else { + if (!other.annotationSpecSetConfigs_.isEmpty()) { + if (annotationSpecSetConfigsBuilder_.isEmpty()) { + annotationSpecSetConfigsBuilder_.dispose(); + annotationSpecSetConfigsBuilder_ = null; + annotationSpecSetConfigs_ = other.annotationSpecSetConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + annotationSpecSetConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnnotationSpecSetConfigsFieldBuilder() + : null; + } else { + annotationSpecSetConfigsBuilder_.addAllMessages(other.annotationSpecSetConfigs_); + } + } + } + if (other.getApplyShotDetection() != false) { + setApplyShotDetection(other.getApplyShotDetection()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig> + annotationSpecSetConfigs_ = java.util.Collections.emptyList(); + + private void ensureAnnotationSpecSetConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + annotationSpecSetConfigs_ = + new java.util.ArrayList< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig>(annotationSpecSetConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + .Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfigOrBuilder> + annotationSpecSetConfigsBuilder_; + + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public java.util.List< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig> + getAnnotationSpecSetConfigsList() { + if (annotationSpecSetConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(annotationSpecSetConfigs_); + } else { + return annotationSpecSetConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public int getAnnotationSpecSetConfigsCount() { + if (annotationSpecSetConfigsBuilder_ == null) { + return annotationSpecSetConfigs_.size(); + } else { + return annotationSpecSetConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + getAnnotationSpecSetConfigs(int index) { + if (annotationSpecSetConfigsBuilder_ == null) { + return annotationSpecSetConfigs_.get(index); + } else { + return annotationSpecSetConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public Builder setAnnotationSpecSetConfigs( + int index, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + value) { + if (annotationSpecSetConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationSpecSetConfigsIsMutable(); + annotationSpecSetConfigs_.set(index, value); + onChanged(); + } else { + annotationSpecSetConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public Builder setAnnotationSpecSetConfigs( + int index, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + .Builder + builderForValue) { + if (annotationSpecSetConfigsBuilder_ == null) { + ensureAnnotationSpecSetConfigsIsMutable(); + annotationSpecSetConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + annotationSpecSetConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public Builder addAnnotationSpecSetConfigs( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + value) { + if (annotationSpecSetConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationSpecSetConfigsIsMutable(); + annotationSpecSetConfigs_.add(value); + onChanged(); + } else { + annotationSpecSetConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public Builder addAnnotationSpecSetConfigs( + int index, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + value) { + if (annotationSpecSetConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationSpecSetConfigsIsMutable(); + annotationSpecSetConfigs_.add(index, value); + onChanged(); + } else { + annotationSpecSetConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public Builder addAnnotationSpecSetConfigs( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + .Builder + builderForValue) { + if (annotationSpecSetConfigsBuilder_ == null) { + ensureAnnotationSpecSetConfigsIsMutable(); + annotationSpecSetConfigs_.add(builderForValue.build()); + onChanged(); + } else { + annotationSpecSetConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public Builder addAnnotationSpecSetConfigs( + int index, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + .Builder + builderForValue) { + if (annotationSpecSetConfigsBuilder_ == null) { + ensureAnnotationSpecSetConfigsIsMutable(); + annotationSpecSetConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + annotationSpecSetConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public Builder addAllAnnotationSpecSetConfigs( + java.lang.Iterable< + ? extends + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig> + values) { + if (annotationSpecSetConfigsBuilder_ == null) { + ensureAnnotationSpecSetConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationSpecSetConfigs_); + onChanged(); + } else { + annotationSpecSetConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public Builder clearAnnotationSpecSetConfigs() { + if (annotationSpecSetConfigsBuilder_ == null) { + annotationSpecSetConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + annotationSpecSetConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public Builder removeAnnotationSpecSetConfigs(int index) { + if (annotationSpecSetConfigsBuilder_ == null) { + ensureAnnotationSpecSetConfigsIsMutable(); + annotationSpecSetConfigs_.remove(index); + onChanged(); + } else { + annotationSpecSetConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + .Builder + getAnnotationSpecSetConfigsBuilder(int index) { + return getAnnotationSpecSetConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfigOrBuilder + getAnnotationSpecSetConfigsOrBuilder(int index) { + if (annotationSpecSetConfigsBuilder_ == null) { + return annotationSpecSetConfigs_.get(index); + } else { + return annotationSpecSetConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public java.util.List< + ? extends + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfigOrBuilder> + getAnnotationSpecSetConfigsOrBuilderList() { + if (annotationSpecSetConfigsBuilder_ != null) { + return annotationSpecSetConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(annotationSpecSetConfigs_); + } + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + .Builder + addAnnotationSpecSetConfigsBuilder() { + return getAnnotationSpecSetConfigsFieldBuilder() + .addBuilder( + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + .Builder + addAnnotationSpecSetConfigsBuilder(int index) { + return getAnnotationSpecSetConfigsFieldBuilder() + .addBuilder( + index, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The list of annotation spec set configs.
+     * Since watching a video clip takes much longer time than an image, we
+     * support label with multiple AnnotationSpecSet at the same time. Labels
+     * in each AnnotationSpecSet will be shown in a group to contributors.
+     * Contributors can select one or more (depending on whether to allow multi
+     * label) from each group.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + public java.util.List< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + .Builder> + getAnnotationSpecSetConfigsBuilderList() { + return getAnnotationSpecSetConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + .Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfigOrBuilder> + getAnnotationSpecSetConfigsFieldBuilder() { + if (annotationSpecSetConfigsBuilder_ == null) { + annotationSpecSetConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfig.Builder, + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfigOrBuilder>( + annotationSpecSetConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + annotationSpecSetConfigs_ = null; + } + return annotationSpecSetConfigsBuilder_; + } + + private boolean applyShotDetection_; + /** + * + * + *
+     * Optional. Option to apply shot detection on the video.
+     * 
+ * + * bool apply_shot_detection = 2; + */ + public boolean getApplyShotDetection() { + return applyShotDetection_; + } + /** + * + * + *
+     * Optional. Option to apply shot detection on the video.
+     * 
+ * + * bool apply_shot_detection = 2; + */ + public Builder setApplyShotDetection(boolean value) { + + applyShotDetection_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Option to apply shot detection on the video.
+     * 
+ * + * bool apply_shot_detection = 2; + */ + public Builder clearApplyShotDetection() { + + applyShotDetection_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + private static final com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig(); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoClassificationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoClassificationConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationConfigOrBuilder.java new file mode 100644 index 000000000000..27bb9815caba --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoClassificationConfigOrBuilder.java @@ -0,0 +1,115 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/human_annotation_config.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface VideoClassificationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.VideoClassificationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The list of annotation spec set configs.
+   * Since watching a video clip takes much longer time than an image, we
+   * support label with multiple AnnotationSpecSet at the same time. Labels
+   * in each AnnotationSpecSet will be shown in a group to contributors.
+   * Contributors can select one or more (depending on whether to allow multi
+   * label) from each group.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + java.util.List< + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig> + getAnnotationSpecSetConfigsList(); + /** + * + * + *
+   * Required. The list of annotation spec set configs.
+   * Since watching a video clip takes much longer time than an image, we
+   * support label with multiple AnnotationSpecSet at the same time. Labels
+   * in each AnnotationSpecSet will be shown in a group to contributors.
+   * Contributors can select one or more (depending on whether to allow multi
+   * label) from each group.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig + getAnnotationSpecSetConfigs(int index); + /** + * + * + *
+   * Required. The list of annotation spec set configs.
+   * Since watching a video clip takes much longer time than an image, we
+   * support label with multiple AnnotationSpecSet at the same time. Labels
+   * in each AnnotationSpecSet will be shown in a group to contributors.
+   * Contributors can select one or more (depending on whether to allow multi
+   * label) from each group.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + int getAnnotationSpecSetConfigsCount(); + /** + * + * + *
+   * Required. The list of annotation spec set configs.
+   * Since watching a video clip takes much longer time than an image, we
+   * support label with multiple AnnotationSpecSet at the same time. Labels
+   * in each AnnotationSpecSet will be shown in a group to contributors.
+   * Contributors can select one or more (depending on whether to allow multi
+   * label) from each group.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + java.util.List< + ? extends + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig + .AnnotationSpecSetConfigOrBuilder> + getAnnotationSpecSetConfigsOrBuilderList(); + /** + * + * + *
+   * Required. The list of annotation spec set configs.
+   * Since watching a video clip takes much longer time than an image, we
+   * support label with multiple AnnotationSpecSet at the same time. Labels
+   * in each AnnotationSpecSet will be shown in a group to contributors.
+   * Contributors can select one or more (depending on whether to allow multi
+   * label) from each group.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfig annotation_spec_set_configs = 1; + * + */ + com.google.cloud.datalabeling.v1beta1.VideoClassificationConfig.AnnotationSpecSetConfigOrBuilder + getAnnotationSpecSetConfigsOrBuilder(int index); + + /** + * + * + *
+   * Optional. Option to apply shot detection on the video.
+   * 
+ * + * bool apply_shot_detection = 2; + */ + boolean getApplyShotDetection(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoEventAnnotation.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoEventAnnotation.java new file mode 100644 index 000000000000..755bb7096055 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoEventAnnotation.java @@ -0,0 +1,975 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Video event annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoEventAnnotation} + */ +public final class VideoEventAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.VideoEventAnnotation) + VideoEventAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoEventAnnotation.newBuilder() to construct. + private VideoEventAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoEventAnnotation() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoEventAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder subBuilder = null; + if (annotationSpec_ != null) { + subBuilder = annotationSpec_.toBuilder(); + } + annotationSpec_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationSpec_); + annotationSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder subBuilder = null; + if (timeSegment_ != null) { + subBuilder = timeSegment_.toBuilder(); + } + timeSegment_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.TimeSegment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeSegment_); + timeSegment_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoEventAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoEventAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.class, + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.Builder.class); + } + + public static final int ANNOTATION_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + /** + * + * + *
+   * Label of the event in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpec_ != null; + } + /** + * + * + *
+   * Label of the event in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + /** + * + * + *
+   * Label of the event in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + return getAnnotationSpec(); + } + + public static final int TIME_SEGMENT_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.TimeSegment timeSegment_; + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public boolean hasTimeSegment() { + return timeSegment_ != null; + } + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegment getTimeSegment() { + return timeSegment_ == null + ? com.google.cloud.datalabeling.v1beta1.TimeSegment.getDefaultInstance() + : timeSegment_; + } + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder() { + return getTimeSegment(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (annotationSpec_ != null) { + output.writeMessage(1, getAnnotationSpec()); + } + if (timeSegment_ != null) { + output.writeMessage(2, getTimeSegment()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (annotationSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnnotationSpec()); + } + if (timeSegment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTimeSegment()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation other = + (com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) obj; + + if (hasAnnotationSpec() != other.hasAnnotationSpec()) return false; + if (hasAnnotationSpec()) { + if (!getAnnotationSpec().equals(other.getAnnotationSpec())) return false; + } + if (hasTimeSegment() != other.hasTimeSegment()) return false; + if (hasTimeSegment()) { + if (!getTimeSegment().equals(other.getTimeSegment())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnnotationSpec()) { + hash = (37 * hash) + ANNOTATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpec().hashCode(); + } + if (hasTimeSegment()) { + hash = (37 * hash) + TIME_SEGMENT_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegment().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video event annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoEventAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.VideoEventAnnotation) + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoEventAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoEventAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.class, + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + if (timeSegmentBuilder_ == null) { + timeSegment_ = null; + } else { + timeSegment_ = null; + timeSegmentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoEventAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation build() { + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation buildPartial() { + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation result = + new com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation(this); + if (annotationSpecBuilder_ == null) { + result.annotationSpec_ = annotationSpec_; + } else { + result.annotationSpec_ = annotationSpecBuilder_.build(); + } + if (timeSegmentBuilder_ == null) { + result.timeSegment_ = timeSegment_; + } else { + result.timeSegment_ = timeSegmentBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation other) { + if (other == com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.getDefaultInstance()) + return this; + if (other.hasAnnotationSpec()) { + mergeAnnotationSpec(other.getAnnotationSpec()); + } + if (other.hasTimeSegment()) { + mergeTimeSegment(other.getTimeSegment()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + annotationSpecBuilder_; + /** + * + * + *
+     * Label of the event in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpecBuilder_ != null || annotationSpec_ != null; + } + /** + * + * + *
+     * Label of the event in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } else { + return annotationSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Label of the event in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationSpec_ = value; + onChanged(); + } else { + annotationSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Label of the event in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder builderForValue) { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = builderForValue.build(); + onChanged(); + } else { + annotationSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Label of the event in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder mergeAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (annotationSpec_ != null) { + annotationSpec_ = + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.newBuilder(annotationSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationSpec_ = value; + } + onChanged(); + } else { + annotationSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Label of the event in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder clearAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + onChanged(); + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Label of the event in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder getAnnotationSpecBuilder() { + + onChanged(); + return getAnnotationSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Label of the event in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + if (annotationSpecBuilder_ != null) { + return annotationSpecBuilder_.getMessageOrBuilder(); + } else { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + } + /** + * + * + *
+     * Label of the event in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + getAnnotationSpecFieldBuilder() { + if (annotationSpecBuilder_ == null) { + annotationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>( + getAnnotationSpec(), getParentForChildren(), isClean()); + annotationSpec_ = null; + } + return annotationSpecBuilder_; + } + + private com.google.cloud.datalabeling.v1beta1.TimeSegment timeSegment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TimeSegment, + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder, + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder> + timeSegmentBuilder_; + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public boolean hasTimeSegment() { + return timeSegmentBuilder_ != null || timeSegment_ != null; + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegment getTimeSegment() { + if (timeSegmentBuilder_ == null) { + return timeSegment_ == null + ? com.google.cloud.datalabeling.v1beta1.TimeSegment.getDefaultInstance() + : timeSegment_; + } else { + return timeSegmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public Builder setTimeSegment(com.google.cloud.datalabeling.v1beta1.TimeSegment value) { + if (timeSegmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSegment_ = value; + onChanged(); + } else { + timeSegmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public Builder setTimeSegment( + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder builderForValue) { + if (timeSegmentBuilder_ == null) { + timeSegment_ = builderForValue.build(); + onChanged(); + } else { + timeSegmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public Builder mergeTimeSegment(com.google.cloud.datalabeling.v1beta1.TimeSegment value) { + if (timeSegmentBuilder_ == null) { + if (timeSegment_ != null) { + timeSegment_ = + com.google.cloud.datalabeling.v1beta1.TimeSegment.newBuilder(timeSegment_) + .mergeFrom(value) + .buildPartial(); + } else { + timeSegment_ = value; + } + onChanged(); + } else { + timeSegmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public Builder clearTimeSegment() { + if (timeSegmentBuilder_ == null) { + timeSegment_ = null; + onChanged(); + } else { + timeSegment_ = null; + timeSegmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder getTimeSegmentBuilder() { + + onChanged(); + return getTimeSegmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder() { + if (timeSegmentBuilder_ != null) { + return timeSegmentBuilder_.getMessageOrBuilder(); + } else { + return timeSegment_ == null + ? com.google.cloud.datalabeling.v1beta1.TimeSegment.getDefaultInstance() + : timeSegment_; + } + } + /** + * + * + *
+     * The time segment of the video to which the annotation applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TimeSegment, + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder, + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder> + getTimeSegmentFieldBuilder() { + if (timeSegmentBuilder_ == null) { + timeSegmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TimeSegment, + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder, + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder>( + getTimeSegment(), getParentForChildren(), isClean()); + timeSegment_ = null; + } + return timeSegmentBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.VideoEventAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.VideoEventAnnotation) + private static final com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation(); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoEventAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoEventAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoEventAnnotation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoEventAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoEventAnnotationOrBuilder.java new file mode 100644 index 000000000000..a77a3dbdd9b3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoEventAnnotationOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface VideoEventAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.VideoEventAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Label of the event in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + boolean hasAnnotationSpec(); + /** + * + * + *
+   * Label of the event in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec(); + /** + * + * + *
+   * Label of the event in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder getAnnotationSpecOrBuilder(); + + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + boolean hasTimeSegment(); + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + com.google.cloud.datalabeling.v1beta1.TimeSegment getTimeSegment(); + /** + * + * + *
+   * The time segment of the video to which the annotation applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoObjectTrackingAnnotation.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoObjectTrackingAnnotation.java new file mode 100644 index 000000000000..af2889c89a14 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoObjectTrackingAnnotation.java @@ -0,0 +1,1553 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Video object tracking annotation.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} + */ +public final class VideoObjectTrackingAnnotation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) + VideoObjectTrackingAnnotationOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoObjectTrackingAnnotation.newBuilder() to construct. + private VideoObjectTrackingAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoObjectTrackingAnnotation() { + objectTrackingFrames_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoObjectTrackingAnnotation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder subBuilder = null; + if (annotationSpec_ != null) { + subBuilder = annotationSpec_.toBuilder(); + } + annotationSpec_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(annotationSpec_); + annotationSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder subBuilder = null; + if (timeSegment_ != null) { + subBuilder = timeSegment_.toBuilder(); + } + timeSegment_ = + input.readMessage( + com.google.cloud.datalabeling.v1beta1.TimeSegment.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeSegment_); + timeSegment_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + objectTrackingFrames_ = + new java.util.ArrayList< + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame>(); + mutable_bitField0_ |= 0x00000004; + } + objectTrackingFrames_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) != 0)) { + objectTrackingFrames_ = java.util.Collections.unmodifiableList(objectTrackingFrames_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoObjectTrackingAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoObjectTrackingAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.class, + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.Builder.class); + } + + private int bitField0_; + public static final int ANNOTATION_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + /** + * + * + *
+   * Label of the object tracked in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpec_ != null; + } + /** + * + * + *
+   * Label of the object tracked in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + /** + * + * + *
+   * Label of the object tracked in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + return getAnnotationSpec(); + } + + public static final int TIME_SEGMENT_FIELD_NUMBER = 2; + private com.google.cloud.datalabeling.v1beta1.TimeSegment timeSegment_; + /** + * + * + *
+   * The time segment of the video to which object tracking applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public boolean hasTimeSegment() { + return timeSegment_ != null; + } + /** + * + * + *
+   * The time segment of the video to which object tracking applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegment getTimeSegment() { + return timeSegment_ == null + ? com.google.cloud.datalabeling.v1beta1.TimeSegment.getDefaultInstance() + : timeSegment_; + } + /** + * + * + *
+   * The time segment of the video to which object tracking applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder() { + return getTimeSegment(); + } + + public static final int OBJECT_TRACKING_FRAMES_FIELD_NUMBER = 3; + private java.util.List + objectTrackingFrames_; + /** + * + * + *
+   * The list of frames where this object track appears.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public java.util.List + getObjectTrackingFramesList() { + return objectTrackingFrames_; + } + /** + * + * + *
+   * The list of frames where this object track appears.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrameOrBuilder> + getObjectTrackingFramesOrBuilderList() { + return objectTrackingFrames_; + } + /** + * + * + *
+   * The list of frames where this object track appears.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public int getObjectTrackingFramesCount() { + return objectTrackingFrames_.size(); + } + /** + * + * + *
+   * The list of frames where this object track appears.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame getObjectTrackingFrames( + int index) { + return objectTrackingFrames_.get(index); + } + /** + * + * + *
+   * The list of frames where this object track appears.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrameOrBuilder + getObjectTrackingFramesOrBuilder(int index) { + return objectTrackingFrames_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (annotationSpec_ != null) { + output.writeMessage(1, getAnnotationSpec()); + } + if (timeSegment_ != null) { + output.writeMessage(2, getTimeSegment()); + } + for (int i = 0; i < objectTrackingFrames_.size(); i++) { + output.writeMessage(3, objectTrackingFrames_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (annotationSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnnotationSpec()); + } + if (timeSegment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTimeSegment()); + } + for (int i = 0; i < objectTrackingFrames_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, objectTrackingFrames_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation other = + (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) obj; + + if (hasAnnotationSpec() != other.hasAnnotationSpec()) return false; + if (hasAnnotationSpec()) { + if (!getAnnotationSpec().equals(other.getAnnotationSpec())) return false; + } + if (hasTimeSegment() != other.hasTimeSegment()) return false; + if (hasTimeSegment()) { + if (!getTimeSegment().equals(other.getTimeSegment())) return false; + } + if (!getObjectTrackingFramesList().equals(other.getObjectTrackingFramesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAnnotationSpec()) { + hash = (37 * hash) + ANNOTATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getAnnotationSpec().hashCode(); + } + if (hasTimeSegment()) { + hash = (37 * hash) + TIME_SEGMENT_FIELD_NUMBER; + hash = (53 * hash) + getTimeSegment().hashCode(); + } + if (getObjectTrackingFramesCount() > 0) { + hash = (37 * hash) + OBJECT_TRACKING_FRAMES_FIELD_NUMBER; + hash = (53 * hash) + getObjectTrackingFramesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Video object tracking annotation.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoObjectTrackingAnnotation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoObjectTrackingAnnotation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.class, + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.Builder.class); + } + + // Construct using + // com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getObjectTrackingFramesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + if (timeSegmentBuilder_ == null) { + timeSegment_ = null; + } else { + timeSegment_ = null; + timeSegmentBuilder_ = null; + } + if (objectTrackingFramesBuilder_ == null) { + objectTrackingFrames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + objectTrackingFramesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.AnnotationOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoObjectTrackingAnnotation_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation build() { + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation buildPartial() { + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation result = + new com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (annotationSpecBuilder_ == null) { + result.annotationSpec_ = annotationSpec_; + } else { + result.annotationSpec_ = annotationSpecBuilder_.build(); + } + if (timeSegmentBuilder_ == null) { + result.timeSegment_ = timeSegment_; + } else { + result.timeSegment_ = timeSegmentBuilder_.build(); + } + if (objectTrackingFramesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + objectTrackingFrames_ = java.util.Collections.unmodifiableList(objectTrackingFrames_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.objectTrackingFrames_ = objectTrackingFrames_; + } else { + result.objectTrackingFrames_ = objectTrackingFramesBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) { + return mergeFrom( + (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation other) { + if (other + == com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + .getDefaultInstance()) return this; + if (other.hasAnnotationSpec()) { + mergeAnnotationSpec(other.getAnnotationSpec()); + } + if (other.hasTimeSegment()) { + mergeTimeSegment(other.getTimeSegment()); + } + if (objectTrackingFramesBuilder_ == null) { + if (!other.objectTrackingFrames_.isEmpty()) { + if (objectTrackingFrames_.isEmpty()) { + objectTrackingFrames_ = other.objectTrackingFrames_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureObjectTrackingFramesIsMutable(); + objectTrackingFrames_.addAll(other.objectTrackingFrames_); + } + onChanged(); + } + } else { + if (!other.objectTrackingFrames_.isEmpty()) { + if (objectTrackingFramesBuilder_.isEmpty()) { + objectTrackingFramesBuilder_.dispose(); + objectTrackingFramesBuilder_ = null; + objectTrackingFrames_ = other.objectTrackingFrames_; + bitField0_ = (bitField0_ & ~0x00000004); + objectTrackingFramesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getObjectTrackingFramesFieldBuilder() + : null; + } else { + objectTrackingFramesBuilder_.addAllMessages(other.objectTrackingFrames_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.datalabeling.v1beta1.AnnotationSpec annotationSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + annotationSpecBuilder_; + /** + * + * + *
+     * Label of the object tracked in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public boolean hasAnnotationSpec() { + return annotationSpecBuilder_ != null || annotationSpec_ != null; + } + /** + * + * + *
+     * Label of the object tracked in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } else { + return annotationSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Label of the object tracked in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + annotationSpec_ = value; + onChanged(); + } else { + annotationSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Label of the object tracked in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder setAnnotationSpec( + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder builderForValue) { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = builderForValue.build(); + onChanged(); + } else { + annotationSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Label of the object tracked in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder mergeAnnotationSpec(com.google.cloud.datalabeling.v1beta1.AnnotationSpec value) { + if (annotationSpecBuilder_ == null) { + if (annotationSpec_ != null) { + annotationSpec_ = + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.newBuilder(annotationSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + annotationSpec_ = value; + } + onChanged(); + } else { + annotationSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Label of the object tracked in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public Builder clearAnnotationSpec() { + if (annotationSpecBuilder_ == null) { + annotationSpec_ = null; + onChanged(); + } else { + annotationSpec_ = null; + annotationSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Label of the object tracked in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder getAnnotationSpecBuilder() { + + onChanged(); + return getAnnotationSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Label of the object tracked in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + public com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder + getAnnotationSpecOrBuilder() { + if (annotationSpecBuilder_ != null) { + return annotationSpecBuilder_.getMessageOrBuilder(); + } else { + return annotationSpec_ == null + ? com.google.cloud.datalabeling.v1beta1.AnnotationSpec.getDefaultInstance() + : annotationSpec_; + } + } + /** + * + * + *
+     * Label of the object tracked in this annotation.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder> + getAnnotationSpecFieldBuilder() { + if (annotationSpecBuilder_ == null) { + annotationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.AnnotationSpec, + com.google.cloud.datalabeling.v1beta1.AnnotationSpec.Builder, + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>( + getAnnotationSpec(), getParentForChildren(), isClean()); + annotationSpec_ = null; + } + return annotationSpecBuilder_; + } + + private com.google.cloud.datalabeling.v1beta1.TimeSegment timeSegment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TimeSegment, + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder, + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder> + timeSegmentBuilder_; + /** + * + * + *
+     * The time segment of the video to which object tracking applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public boolean hasTimeSegment() { + return timeSegmentBuilder_ != null || timeSegment_ != null; + } + /** + * + * + *
+     * The time segment of the video to which object tracking applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegment getTimeSegment() { + if (timeSegmentBuilder_ == null) { + return timeSegment_ == null + ? com.google.cloud.datalabeling.v1beta1.TimeSegment.getDefaultInstance() + : timeSegment_; + } else { + return timeSegmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time segment of the video to which object tracking applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public Builder setTimeSegment(com.google.cloud.datalabeling.v1beta1.TimeSegment value) { + if (timeSegmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeSegment_ = value; + onChanged(); + } else { + timeSegmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which object tracking applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public Builder setTimeSegment( + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder builderForValue) { + if (timeSegmentBuilder_ == null) { + timeSegment_ = builderForValue.build(); + onChanged(); + } else { + timeSegmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which object tracking applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public Builder mergeTimeSegment(com.google.cloud.datalabeling.v1beta1.TimeSegment value) { + if (timeSegmentBuilder_ == null) { + if (timeSegment_ != null) { + timeSegment_ = + com.google.cloud.datalabeling.v1beta1.TimeSegment.newBuilder(timeSegment_) + .mergeFrom(value) + .buildPartial(); + } else { + timeSegment_ = value; + } + onChanged(); + } else { + timeSegmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which object tracking applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public Builder clearTimeSegment() { + if (timeSegmentBuilder_ == null) { + timeSegment_ = null; + onChanged(); + } else { + timeSegment_ = null; + timeSegmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The time segment of the video to which object tracking applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder getTimeSegmentBuilder() { + + onChanged(); + return getTimeSegmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The time segment of the video to which object tracking applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + public com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder() { + if (timeSegmentBuilder_ != null) { + return timeSegmentBuilder_.getMessageOrBuilder(); + } else { + return timeSegment_ == null + ? com.google.cloud.datalabeling.v1beta1.TimeSegment.getDefaultInstance() + : timeSegment_; + } + } + /** + * + * + *
+     * The time segment of the video to which object tracking applies.
+     * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TimeSegment, + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder, + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder> + getTimeSegmentFieldBuilder() { + if (timeSegmentBuilder_ == null) { + timeSegmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.TimeSegment, + com.google.cloud.datalabeling.v1beta1.TimeSegment.Builder, + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder>( + getTimeSegment(), getParentForChildren(), isClean()); + timeSegment_ = null; + } + return timeSegmentBuilder_; + } + + private java.util.List + objectTrackingFrames_ = java.util.Collections.emptyList(); + + private void ensureObjectTrackingFramesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + objectTrackingFrames_ = + new java.util.ArrayList( + objectTrackingFrames_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrameOrBuilder> + objectTrackingFramesBuilder_; + + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public java.util.List + getObjectTrackingFramesList() { + if (objectTrackingFramesBuilder_ == null) { + return java.util.Collections.unmodifiableList(objectTrackingFrames_); + } else { + return objectTrackingFramesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public int getObjectTrackingFramesCount() { + if (objectTrackingFramesBuilder_ == null) { + return objectTrackingFrames_.size(); + } else { + return objectTrackingFramesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame getObjectTrackingFrames( + int index) { + if (objectTrackingFramesBuilder_ == null) { + return objectTrackingFrames_.get(index); + } else { + return objectTrackingFramesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public Builder setObjectTrackingFrames( + int index, com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame value) { + if (objectTrackingFramesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectTrackingFramesIsMutable(); + objectTrackingFrames_.set(index, value); + onChanged(); + } else { + objectTrackingFramesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public Builder setObjectTrackingFrames( + int index, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.Builder builderForValue) { + if (objectTrackingFramesBuilder_ == null) { + ensureObjectTrackingFramesIsMutable(); + objectTrackingFrames_.set(index, builderForValue.build()); + onChanged(); + } else { + objectTrackingFramesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public Builder addObjectTrackingFrames( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame value) { + if (objectTrackingFramesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectTrackingFramesIsMutable(); + objectTrackingFrames_.add(value); + onChanged(); + } else { + objectTrackingFramesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public Builder addObjectTrackingFrames( + int index, com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame value) { + if (objectTrackingFramesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureObjectTrackingFramesIsMutable(); + objectTrackingFrames_.add(index, value); + onChanged(); + } else { + objectTrackingFramesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public Builder addObjectTrackingFrames( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.Builder builderForValue) { + if (objectTrackingFramesBuilder_ == null) { + ensureObjectTrackingFramesIsMutable(); + objectTrackingFrames_.add(builderForValue.build()); + onChanged(); + } else { + objectTrackingFramesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public Builder addObjectTrackingFrames( + int index, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.Builder builderForValue) { + if (objectTrackingFramesBuilder_ == null) { + ensureObjectTrackingFramesIsMutable(); + objectTrackingFrames_.add(index, builderForValue.build()); + onChanged(); + } else { + objectTrackingFramesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public Builder addAllObjectTrackingFrames( + java.lang.Iterable + values) { + if (objectTrackingFramesBuilder_ == null) { + ensureObjectTrackingFramesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, objectTrackingFrames_); + onChanged(); + } else { + objectTrackingFramesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public Builder clearObjectTrackingFrames() { + if (objectTrackingFramesBuilder_ == null) { + objectTrackingFrames_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + objectTrackingFramesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public Builder removeObjectTrackingFrames(int index) { + if (objectTrackingFramesBuilder_ == null) { + ensureObjectTrackingFramesIsMutable(); + objectTrackingFrames_.remove(index); + onChanged(); + } else { + objectTrackingFramesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.Builder + getObjectTrackingFramesBuilder(int index) { + return getObjectTrackingFramesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrameOrBuilder + getObjectTrackingFramesOrBuilder(int index) { + if (objectTrackingFramesBuilder_ == null) { + return objectTrackingFrames_.get(index); + } else { + return objectTrackingFramesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrameOrBuilder> + getObjectTrackingFramesOrBuilderList() { + if (objectTrackingFramesBuilder_ != null) { + return objectTrackingFramesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(objectTrackingFrames_); + } + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.Builder + addObjectTrackingFramesBuilder() { + return getObjectTrackingFramesFieldBuilder() + .addBuilder( + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.getDefaultInstance()); + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.Builder + addObjectTrackingFramesBuilder(int index) { + return getObjectTrackingFramesFieldBuilder() + .addBuilder( + index, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.getDefaultInstance()); + } + /** + * + * + *
+     * The list of frames where this object track appears.
+     * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + public java.util.List + getObjectTrackingFramesBuilderList() { + return getObjectTrackingFramesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrameOrBuilder> + getObjectTrackingFramesFieldBuilder() { + if (objectTrackingFramesBuilder_ == null) { + objectTrackingFramesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.Builder, + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrameOrBuilder>( + objectTrackingFrames_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + objectTrackingFrames_ = null; + } + return objectTrackingFramesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) + private static final com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation(); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoObjectTrackingAnnotation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoObjectTrackingAnnotation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoObjectTrackingAnnotationOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoObjectTrackingAnnotationOrBuilder.java new file mode 100644 index 000000000000..da3783d53d18 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoObjectTrackingAnnotationOrBuilder.java @@ -0,0 +1,136 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/annotation.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface VideoObjectTrackingAnnotationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Label of the object tracked in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + boolean hasAnnotationSpec(); + /** + * + * + *
+   * Label of the object tracked in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpec getAnnotationSpec(); + /** + * + * + *
+   * Label of the object tracked in this annotation.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1; + */ + com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder getAnnotationSpecOrBuilder(); + + /** + * + * + *
+   * The time segment of the video to which object tracking applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + boolean hasTimeSegment(); + /** + * + * + *
+   * The time segment of the video to which object tracking applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + com.google.cloud.datalabeling.v1beta1.TimeSegment getTimeSegment(); + /** + * + * + *
+   * The time segment of the video to which object tracking applies.
+   * 
+ * + * .google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2; + */ + com.google.cloud.datalabeling.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder(); + + /** + * + * + *
+   * The list of frames where this object track appears.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + java.util.List + getObjectTrackingFramesList(); + /** + * + * + *
+   * The list of frames where this object track appears.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame getObjectTrackingFrames(int index); + /** + * + * + *
+   * The list of frames where this object track appears.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + int getObjectTrackingFramesCount(); + /** + * + * + *
+   * The list of frames where this object track appears.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + java.util.List + getObjectTrackingFramesOrBuilderList(); + /** + * + * + *
+   * The list of frames where this object track appears.
+   * 
+ * + * + * repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3; + * + */ + com.google.cloud.datalabeling.v1beta1.ObjectTrackingFrameOrBuilder + getObjectTrackingFramesOrBuilder(int index); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoPayload.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoPayload.java new file mode 100644 index 000000000000..d5660b4dc5ce --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoPayload.java @@ -0,0 +1,1346 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Container of information of a video.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoPayload} + */ +public final class VideoPayload extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.VideoPayload) + VideoPayloadOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoPayload.newBuilder() to construct. + private VideoPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoPayload() { + mimeType_ = ""; + videoUri_ = ""; + videoThumbnails_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoPayload( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + mimeType_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + videoUri_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + videoThumbnails_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + videoThumbnails_.add( + input.readMessage( + com.google.cloud.datalabeling.v1beta1.VideoThumbnail.parser(), + extensionRegistry)); + break; + } + case 37: + { + frameRate_ = input.readFloat(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) != 0)) { + videoThumbnails_ = java.util.Collections.unmodifiableList(videoThumbnails_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoPayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoPayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoPayload.class, + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder.class); + } + + private int bitField0_; + public static final int MIME_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object mimeType_; + /** + * + * + *
+   * Video format.
+   * 
+ * + * string mime_type = 1; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } + } + /** + * + * + *
+   * Video format.
+   * 
+ * + * string mime_type = 1; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIDEO_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object videoUri_; + /** + * + * + *
+   * Video uri from the user bucket.
+   * 
+ * + * string video_uri = 2; + */ + public java.lang.String getVideoUri() { + java.lang.Object ref = videoUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + videoUri_ = s; + return s; + } + } + /** + * + * + *
+   * Video uri from the user bucket.
+   * 
+ * + * string video_uri = 2; + */ + public com.google.protobuf.ByteString getVideoUriBytes() { + java.lang.Object ref = videoUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + videoUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIDEO_THUMBNAILS_FIELD_NUMBER = 3; + private java.util.List videoThumbnails_; + /** + * + * + *
+   * The list of video thumbnails.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public java.util.List + getVideoThumbnailsList() { + return videoThumbnails_; + } + /** + * + * + *
+   * The list of video thumbnails.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public java.util.List + getVideoThumbnailsOrBuilderList() { + return videoThumbnails_; + } + /** + * + * + *
+   * The list of video thumbnails.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public int getVideoThumbnailsCount() { + return videoThumbnails_.size(); + } + /** + * + * + *
+   * The list of video thumbnails.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public com.google.cloud.datalabeling.v1beta1.VideoThumbnail getVideoThumbnails(int index) { + return videoThumbnails_.get(index); + } + /** + * + * + *
+   * The list of video thumbnails.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public com.google.cloud.datalabeling.v1beta1.VideoThumbnailOrBuilder getVideoThumbnailsOrBuilder( + int index) { + return videoThumbnails_.get(index); + } + + public static final int FRAME_RATE_FIELD_NUMBER = 4; + private float frameRate_; + /** + * + * + *
+   * FPS of the video.
+   * 
+ * + * float frame_rate = 4; + */ + public float getFrameRate() { + return frameRate_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getMimeTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mimeType_); + } + if (!getVideoUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, videoUri_); + } + for (int i = 0; i < videoThumbnails_.size(); i++) { + output.writeMessage(3, videoThumbnails_.get(i)); + } + if (frameRate_ != 0F) { + output.writeFloat(4, frameRate_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMimeTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, mimeType_); + } + if (!getVideoUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, videoUri_); + } + for (int i = 0; i < videoThumbnails_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, videoThumbnails_.get(i)); + } + if (frameRate_ != 0F) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, frameRate_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.VideoPayload)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.VideoPayload other = + (com.google.cloud.datalabeling.v1beta1.VideoPayload) obj; + + if (!getMimeType().equals(other.getMimeType())) return false; + if (!getVideoUri().equals(other.getVideoUri())) return false; + if (!getVideoThumbnailsList().equals(other.getVideoThumbnailsList())) return false; + if (java.lang.Float.floatToIntBits(getFrameRate()) + != java.lang.Float.floatToIntBits(other.getFrameRate())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMimeType().hashCode(); + hash = (37 * hash) + VIDEO_URI_FIELD_NUMBER; + hash = (53 * hash) + getVideoUri().hashCode(); + if (getVideoThumbnailsCount() > 0) { + hash = (37 * hash) + VIDEO_THUMBNAILS_FIELD_NUMBER; + hash = (53 * hash) + getVideoThumbnailsList().hashCode(); + } + hash = (37 * hash) + FRAME_RATE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getFrameRate()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.VideoPayload prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Container of information of a video.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoPayload} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.VideoPayload) + com.google.cloud.datalabeling.v1beta1.VideoPayloadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoPayload_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoPayload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoPayload.class, + com.google.cloud.datalabeling.v1beta1.VideoPayload.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.VideoPayload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getVideoThumbnailsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + mimeType_ = ""; + + videoUri_ = ""; + + if (videoThumbnailsBuilder_ == null) { + videoThumbnails_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + videoThumbnailsBuilder_.clear(); + } + frameRate_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoPayload_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoPayload getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoPayload build() { + com.google.cloud.datalabeling.v1beta1.VideoPayload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoPayload buildPartial() { + com.google.cloud.datalabeling.v1beta1.VideoPayload result = + new com.google.cloud.datalabeling.v1beta1.VideoPayload(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.mimeType_ = mimeType_; + result.videoUri_ = videoUri_; + if (videoThumbnailsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + videoThumbnails_ = java.util.Collections.unmodifiableList(videoThumbnails_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.videoThumbnails_ = videoThumbnails_; + } else { + result.videoThumbnails_ = videoThumbnailsBuilder_.build(); + } + result.frameRate_ = frameRate_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.VideoPayload) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.VideoPayload) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.VideoPayload other) { + if (other == com.google.cloud.datalabeling.v1beta1.VideoPayload.getDefaultInstance()) + return this; + if (!other.getMimeType().isEmpty()) { + mimeType_ = other.mimeType_; + onChanged(); + } + if (!other.getVideoUri().isEmpty()) { + videoUri_ = other.videoUri_; + onChanged(); + } + if (videoThumbnailsBuilder_ == null) { + if (!other.videoThumbnails_.isEmpty()) { + if (videoThumbnails_.isEmpty()) { + videoThumbnails_ = other.videoThumbnails_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureVideoThumbnailsIsMutable(); + videoThumbnails_.addAll(other.videoThumbnails_); + } + onChanged(); + } + } else { + if (!other.videoThumbnails_.isEmpty()) { + if (videoThumbnailsBuilder_.isEmpty()) { + videoThumbnailsBuilder_.dispose(); + videoThumbnailsBuilder_ = null; + videoThumbnails_ = other.videoThumbnails_; + bitField0_ = (bitField0_ & ~0x00000004); + videoThumbnailsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVideoThumbnailsFieldBuilder() + : null; + } else { + videoThumbnailsBuilder_.addAllMessages(other.videoThumbnails_); + } + } + } + if (other.getFrameRate() != 0F) { + setFrameRate(other.getFrameRate()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.VideoPayload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.VideoPayload) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object mimeType_ = ""; + /** + * + * + *
+     * Video format.
+     * 
+ * + * string mime_type = 1; + */ + public java.lang.String getMimeType() { + java.lang.Object ref = mimeType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mimeType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Video format.
+     * 
+ * + * string mime_type = 1; + */ + public com.google.protobuf.ByteString getMimeTypeBytes() { + java.lang.Object ref = mimeType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mimeType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Video format.
+     * 
+ * + * string mime_type = 1; + */ + public Builder setMimeType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mimeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Video format.
+     * 
+ * + * string mime_type = 1; + */ + public Builder clearMimeType() { + + mimeType_ = getDefaultInstance().getMimeType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Video format.
+     * 
+ * + * string mime_type = 1; + */ + public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mimeType_ = value; + onChanged(); + return this; + } + + private java.lang.Object videoUri_ = ""; + /** + * + * + *
+     * Video uri from the user bucket.
+     * 
+ * + * string video_uri = 2; + */ + public java.lang.String getVideoUri() { + java.lang.Object ref = videoUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + videoUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Video uri from the user bucket.
+     * 
+ * + * string video_uri = 2; + */ + public com.google.protobuf.ByteString getVideoUriBytes() { + java.lang.Object ref = videoUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + videoUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Video uri from the user bucket.
+     * 
+ * + * string video_uri = 2; + */ + public Builder setVideoUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + videoUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Video uri from the user bucket.
+     * 
+ * + * string video_uri = 2; + */ + public Builder clearVideoUri() { + + videoUri_ = getDefaultInstance().getVideoUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Video uri from the user bucket.
+     * 
+ * + * string video_uri = 2; + */ + public Builder setVideoUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + videoUri_ = value; + onChanged(); + return this; + } + + private java.util.List videoThumbnails_ = + java.util.Collections.emptyList(); + + private void ensureVideoThumbnailsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + videoThumbnails_ = + new java.util.ArrayList( + videoThumbnails_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoThumbnail, + com.google.cloud.datalabeling.v1beta1.VideoThumbnail.Builder, + com.google.cloud.datalabeling.v1beta1.VideoThumbnailOrBuilder> + videoThumbnailsBuilder_; + + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public java.util.List + getVideoThumbnailsList() { + if (videoThumbnailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(videoThumbnails_); + } else { + return videoThumbnailsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public int getVideoThumbnailsCount() { + if (videoThumbnailsBuilder_ == null) { + return videoThumbnails_.size(); + } else { + return videoThumbnailsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public com.google.cloud.datalabeling.v1beta1.VideoThumbnail getVideoThumbnails(int index) { + if (videoThumbnailsBuilder_ == null) { + return videoThumbnails_.get(index); + } else { + return videoThumbnailsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public Builder setVideoThumbnails( + int index, com.google.cloud.datalabeling.v1beta1.VideoThumbnail value) { + if (videoThumbnailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVideoThumbnailsIsMutable(); + videoThumbnails_.set(index, value); + onChanged(); + } else { + videoThumbnailsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public Builder setVideoThumbnails( + int index, com.google.cloud.datalabeling.v1beta1.VideoThumbnail.Builder builderForValue) { + if (videoThumbnailsBuilder_ == null) { + ensureVideoThumbnailsIsMutable(); + videoThumbnails_.set(index, builderForValue.build()); + onChanged(); + } else { + videoThumbnailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public Builder addVideoThumbnails(com.google.cloud.datalabeling.v1beta1.VideoThumbnail value) { + if (videoThumbnailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVideoThumbnailsIsMutable(); + videoThumbnails_.add(value); + onChanged(); + } else { + videoThumbnailsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public Builder addVideoThumbnails( + int index, com.google.cloud.datalabeling.v1beta1.VideoThumbnail value) { + if (videoThumbnailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVideoThumbnailsIsMutable(); + videoThumbnails_.add(index, value); + onChanged(); + } else { + videoThumbnailsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public Builder addVideoThumbnails( + com.google.cloud.datalabeling.v1beta1.VideoThumbnail.Builder builderForValue) { + if (videoThumbnailsBuilder_ == null) { + ensureVideoThumbnailsIsMutable(); + videoThumbnails_.add(builderForValue.build()); + onChanged(); + } else { + videoThumbnailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public Builder addVideoThumbnails( + int index, com.google.cloud.datalabeling.v1beta1.VideoThumbnail.Builder builderForValue) { + if (videoThumbnailsBuilder_ == null) { + ensureVideoThumbnailsIsMutable(); + videoThumbnails_.add(index, builderForValue.build()); + onChanged(); + } else { + videoThumbnailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public Builder addAllVideoThumbnails( + java.lang.Iterable values) { + if (videoThumbnailsBuilder_ == null) { + ensureVideoThumbnailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, videoThumbnails_); + onChanged(); + } else { + videoThumbnailsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public Builder clearVideoThumbnails() { + if (videoThumbnailsBuilder_ == null) { + videoThumbnails_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + videoThumbnailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public Builder removeVideoThumbnails(int index) { + if (videoThumbnailsBuilder_ == null) { + ensureVideoThumbnailsIsMutable(); + videoThumbnails_.remove(index); + onChanged(); + } else { + videoThumbnailsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public com.google.cloud.datalabeling.v1beta1.VideoThumbnail.Builder getVideoThumbnailsBuilder( + int index) { + return getVideoThumbnailsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public com.google.cloud.datalabeling.v1beta1.VideoThumbnailOrBuilder + getVideoThumbnailsOrBuilder(int index) { + if (videoThumbnailsBuilder_ == null) { + return videoThumbnails_.get(index); + } else { + return videoThumbnailsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public java.util.List + getVideoThumbnailsOrBuilderList() { + if (videoThumbnailsBuilder_ != null) { + return videoThumbnailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(videoThumbnails_); + } + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public com.google.cloud.datalabeling.v1beta1.VideoThumbnail.Builder + addVideoThumbnailsBuilder() { + return getVideoThumbnailsFieldBuilder() + .addBuilder(com.google.cloud.datalabeling.v1beta1.VideoThumbnail.getDefaultInstance()); + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public com.google.cloud.datalabeling.v1beta1.VideoThumbnail.Builder addVideoThumbnailsBuilder( + int index) { + return getVideoThumbnailsFieldBuilder() + .addBuilder( + index, com.google.cloud.datalabeling.v1beta1.VideoThumbnail.getDefaultInstance()); + } + /** + * + * + *
+     * The list of video thumbnails.
+     * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + public java.util.List + getVideoThumbnailsBuilderList() { + return getVideoThumbnailsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoThumbnail, + com.google.cloud.datalabeling.v1beta1.VideoThumbnail.Builder, + com.google.cloud.datalabeling.v1beta1.VideoThumbnailOrBuilder> + getVideoThumbnailsFieldBuilder() { + if (videoThumbnailsBuilder_ == null) { + videoThumbnailsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.datalabeling.v1beta1.VideoThumbnail, + com.google.cloud.datalabeling.v1beta1.VideoThumbnail.Builder, + com.google.cloud.datalabeling.v1beta1.VideoThumbnailOrBuilder>( + videoThumbnails_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + videoThumbnails_ = null; + } + return videoThumbnailsBuilder_; + } + + private float frameRate_; + /** + * + * + *
+     * FPS of the video.
+     * 
+ * + * float frame_rate = 4; + */ + public float getFrameRate() { + return frameRate_; + } + /** + * + * + *
+     * FPS of the video.
+     * 
+ * + * float frame_rate = 4; + */ + public Builder setFrameRate(float value) { + + frameRate_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * FPS of the video.
+     * 
+ * + * float frame_rate = 4; + */ + public Builder clearFrameRate() { + + frameRate_ = 0F; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.VideoPayload) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.VideoPayload) + private static final com.google.cloud.datalabeling.v1beta1.VideoPayload DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.VideoPayload(); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoPayload getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoPayload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoPayload(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoPayload getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoPayloadOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoPayloadOrBuilder.java new file mode 100644 index 000000000000..3064149df9b9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoPayloadOrBuilder.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface VideoPayloadOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.VideoPayload) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Video format.
+   * 
+ * + * string mime_type = 1; + */ + java.lang.String getMimeType(); + /** + * + * + *
+   * Video format.
+   * 
+ * + * string mime_type = 1; + */ + com.google.protobuf.ByteString getMimeTypeBytes(); + + /** + * + * + *
+   * Video uri from the user bucket.
+   * 
+ * + * string video_uri = 2; + */ + java.lang.String getVideoUri(); + /** + * + * + *
+   * Video uri from the user bucket.
+   * 
+ * + * string video_uri = 2; + */ + com.google.protobuf.ByteString getVideoUriBytes(); + + /** + * + * + *
+   * The list of video thumbnails.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + java.util.List getVideoThumbnailsList(); + /** + * + * + *
+   * The list of video thumbnails.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + com.google.cloud.datalabeling.v1beta1.VideoThumbnail getVideoThumbnails(int index); + /** + * + * + *
+   * The list of video thumbnails.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + int getVideoThumbnailsCount(); + /** + * + * + *
+   * The list of video thumbnails.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + java.util.List + getVideoThumbnailsOrBuilderList(); + /** + * + * + *
+   * The list of video thumbnails.
+   * 
+ * + * repeated .google.cloud.datalabeling.v1beta1.VideoThumbnail video_thumbnails = 3; + */ + com.google.cloud.datalabeling.v1beta1.VideoThumbnailOrBuilder getVideoThumbnailsOrBuilder( + int index); + + /** + * + * + *
+   * FPS of the video.
+   * 
+ * + * float frame_rate = 4; + */ + float getFrameRate(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoThumbnail.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoThumbnail.java new file mode 100644 index 000000000000..9008beef2ee3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoThumbnail.java @@ -0,0 +1,793 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +/** + * + * + *
+ * Container of information of a video thumbnail.
+ * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoThumbnail} + */ +public final class VideoThumbnail extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.datalabeling.v1beta1.VideoThumbnail) + VideoThumbnailOrBuilder { + private static final long serialVersionUID = 0L; + // Use VideoThumbnail.newBuilder() to construct. + private VideoThumbnail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VideoThumbnail() { + thumbnail_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private VideoThumbnail( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + thumbnail_ = input.readBytes(); + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (timeOffset_ != null) { + subBuilder = timeOffset_.toBuilder(); + } + timeOffset_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(timeOffset_); + timeOffset_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoThumbnail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoThumbnail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoThumbnail.class, + com.google.cloud.datalabeling.v1beta1.VideoThumbnail.Builder.class); + } + + public static final int THUMBNAIL_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString thumbnail_; + /** + * + * + *
+   * A byte string of the video frame.
+   * 
+ * + * bytes thumbnail = 1; + */ + public com.google.protobuf.ByteString getThumbnail() { + return thumbnail_; + } + + public static final int TIME_OFFSET_FIELD_NUMBER = 2; + private com.google.protobuf.Duration timeOffset_; + /** + * + * + *
+   * Time offset relative to the beginning of the video, corresponding to the
+   * video frame where the thumbnail has been extracted from.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public boolean hasTimeOffset() { + return timeOffset_ != null; + } + /** + * + * + *
+   * Time offset relative to the beginning of the video, corresponding to the
+   * video frame where the thumbnail has been extracted from.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.Duration getTimeOffset() { + return timeOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeOffset_; + } + /** + * + * + *
+   * Time offset relative to the beginning of the video, corresponding to the
+   * video frame where the thumbnail has been extracted from.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + return getTimeOffset(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!thumbnail_.isEmpty()) { + output.writeBytes(1, thumbnail_); + } + if (timeOffset_ != null) { + output.writeMessage(2, getTimeOffset()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!thumbnail_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, thumbnail_); + } + if (timeOffset_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTimeOffset()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.datalabeling.v1beta1.VideoThumbnail)) { + return super.equals(obj); + } + com.google.cloud.datalabeling.v1beta1.VideoThumbnail other = + (com.google.cloud.datalabeling.v1beta1.VideoThumbnail) obj; + + if (!getThumbnail().equals(other.getThumbnail())) return false; + if (hasTimeOffset() != other.hasTimeOffset()) return false; + if (hasTimeOffset()) { + if (!getTimeOffset().equals(other.getTimeOffset())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + THUMBNAIL_FIELD_NUMBER; + hash = (53 * hash) + getThumbnail().hashCode(); + if (hasTimeOffset()) { + hash = (37 * hash) + TIME_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getTimeOffset().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.datalabeling.v1beta1.VideoThumbnail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Container of information of a video thumbnail.
+   * 
+ * + * Protobuf type {@code google.cloud.datalabeling.v1beta1.VideoThumbnail} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.datalabeling.v1beta1.VideoThumbnail) + com.google.cloud.datalabeling.v1beta1.VideoThumbnailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoThumbnail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoThumbnail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.datalabeling.v1beta1.VideoThumbnail.class, + com.google.cloud.datalabeling.v1beta1.VideoThumbnail.Builder.class); + } + + // Construct using com.google.cloud.datalabeling.v1beta1.VideoThumbnail.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + thumbnail_ = com.google.protobuf.ByteString.EMPTY; + + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.datalabeling.v1beta1.DatasetOuterClass + .internal_static_google_cloud_datalabeling_v1beta1_VideoThumbnail_descriptor; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoThumbnail getDefaultInstanceForType() { + return com.google.cloud.datalabeling.v1beta1.VideoThumbnail.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoThumbnail build() { + com.google.cloud.datalabeling.v1beta1.VideoThumbnail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoThumbnail buildPartial() { + com.google.cloud.datalabeling.v1beta1.VideoThumbnail result = + new com.google.cloud.datalabeling.v1beta1.VideoThumbnail(this); + result.thumbnail_ = thumbnail_; + if (timeOffsetBuilder_ == null) { + result.timeOffset_ = timeOffset_; + } else { + result.timeOffset_ = timeOffsetBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.datalabeling.v1beta1.VideoThumbnail) { + return mergeFrom((com.google.cloud.datalabeling.v1beta1.VideoThumbnail) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.datalabeling.v1beta1.VideoThumbnail other) { + if (other == com.google.cloud.datalabeling.v1beta1.VideoThumbnail.getDefaultInstance()) + return this; + if (other.getThumbnail() != com.google.protobuf.ByteString.EMPTY) { + setThumbnail(other.getThumbnail()); + } + if (other.hasTimeOffset()) { + mergeTimeOffset(other.getTimeOffset()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.datalabeling.v1beta1.VideoThumbnail parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.datalabeling.v1beta1.VideoThumbnail) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString thumbnail_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * A byte string of the video frame.
+     * 
+ * + * bytes thumbnail = 1; + */ + public com.google.protobuf.ByteString getThumbnail() { + return thumbnail_; + } + /** + * + * + *
+     * A byte string of the video frame.
+     * 
+ * + * bytes thumbnail = 1; + */ + public Builder setThumbnail(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + thumbnail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A byte string of the video frame.
+     * 
+ * + * bytes thumbnail = 1; + */ + public Builder clearThumbnail() { + + thumbnail_ = getDefaultInstance().getThumbnail(); + onChanged(); + return this; + } + + private com.google.protobuf.Duration timeOffset_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + timeOffsetBuilder_; + /** + * + * + *
+     * Time offset relative to the beginning of the video, corresponding to the
+     * video frame where the thumbnail has been extracted from.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public boolean hasTimeOffset() { + return timeOffsetBuilder_ != null || timeOffset_ != null; + } + /** + * + * + *
+     * Time offset relative to the beginning of the video, corresponding to the
+     * video frame where the thumbnail has been extracted from.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.Duration getTimeOffset() { + if (timeOffsetBuilder_ == null) { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } else { + return timeOffsetBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Time offset relative to the beginning of the video, corresponding to the
+     * video frame where the thumbnail has been extracted from.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder setTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeOffset_ = value; + onChanged(); + } else { + timeOffsetBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Time offset relative to the beginning of the video, corresponding to the
+     * video frame where the thumbnail has been extracted from.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder setTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { + if (timeOffsetBuilder_ == null) { + timeOffset_ = builderForValue.build(); + onChanged(); + } else { + timeOffsetBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Time offset relative to the beginning of the video, corresponding to the
+     * video frame where the thumbnail has been extracted from.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder mergeTimeOffset(com.google.protobuf.Duration value) { + if (timeOffsetBuilder_ == null) { + if (timeOffset_ != null) { + timeOffset_ = + com.google.protobuf.Duration.newBuilder(timeOffset_).mergeFrom(value).buildPartial(); + } else { + timeOffset_ = value; + } + onChanged(); + } else { + timeOffsetBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Time offset relative to the beginning of the video, corresponding to the
+     * video frame where the thumbnail has been extracted from.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public Builder clearTimeOffset() { + if (timeOffsetBuilder_ == null) { + timeOffset_ = null; + onChanged(); + } else { + timeOffset_ = null; + timeOffsetBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Time offset relative to the beginning of the video, corresponding to the
+     * video frame where the thumbnail has been extracted from.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.Duration.Builder getTimeOffsetBuilder() { + + onChanged(); + return getTimeOffsetFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Time offset relative to the beginning of the video, corresponding to the
+     * video frame where the thumbnail has been extracted from.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { + if (timeOffsetBuilder_ != null) { + return timeOffsetBuilder_.getMessageOrBuilder(); + } else { + return timeOffset_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : timeOffset_; + } + } + /** + * + * + *
+     * Time offset relative to the beginning of the video, corresponding to the
+     * video frame where the thumbnail has been extracted from.
+     * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTimeOffsetFieldBuilder() { + if (timeOffsetBuilder_ == null) { + timeOffsetBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getTimeOffset(), getParentForChildren(), isClean()); + timeOffset_ = null; + } + return timeOffsetBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.datalabeling.v1beta1.VideoThumbnail) + } + + // @@protoc_insertion_point(class_scope:google.cloud.datalabeling.v1beta1.VideoThumbnail) + private static final com.google.cloud.datalabeling.v1beta1.VideoThumbnail DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.datalabeling.v1beta1.VideoThumbnail(); + } + + public static com.google.cloud.datalabeling.v1beta1.VideoThumbnail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VideoThumbnail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VideoThumbnail(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.datalabeling.v1beta1.VideoThumbnail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoThumbnailOrBuilder.java b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoThumbnailOrBuilder.java new file mode 100644 index 000000000000..8c97363a4607 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/java/com/google/cloud/datalabeling/v1beta1/VideoThumbnailOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/datalabeling/v1beta1/dataset.proto + +package com.google.cloud.datalabeling.v1beta1; + +public interface VideoThumbnailOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.datalabeling.v1beta1.VideoThumbnail) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A byte string of the video frame.
+   * 
+ * + * bytes thumbnail = 1; + */ + com.google.protobuf.ByteString getThumbnail(); + + /** + * + * + *
+   * Time offset relative to the beginning of the video, corresponding to the
+   * video frame where the thumbnail has been extracted from.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + boolean hasTimeOffset(); + /** + * + * + *
+   * Time offset relative to the beginning of the video, corresponding to the
+   * video frame where the thumbnail has been extracted from.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + com.google.protobuf.Duration getTimeOffset(); + /** + * + * + *
+   * Time offset relative to the beginning of the video, corresponding to the
+   * video frame where the thumbnail has been extracted from.
+   * 
+ * + * .google.protobuf.Duration time_offset = 2; + */ + com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/annotation.proto b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/annotation.proto new file mode 100644 index 000000000000..204ad8e3d874 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/annotation.proto @@ -0,0 +1,337 @@ +// 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. +// + +syntax = "proto3"; + +package google.cloud.datalabeling.v1beta1; + +import "google/cloud/datalabeling/v1beta1/annotation_spec_set.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datalabeling.v1beta1"; + + +// Specifies where is the answer from. +enum AnnotationSource { + ANNOTATION_SOURCE_UNSPECIFIED = 0; + + // Answer is provided by a human contributor. + OPERATOR = 3; +} + +enum AnnotationSentiment { + ANNOTATION_SENTIMENT_UNSPECIFIED = 0; + + // This annotation describes negatively about the data. + NEGATIVE = 1; + + // This label describes positively about the data. + POSITIVE = 2; +} + +enum AnnotationType { + ANNOTATION_TYPE_UNSPECIFIED = 0; + + // Classification annotations in an image. + IMAGE_CLASSIFICATION_ANNOTATION = 1; + + // Bounding box annotations in an image. + IMAGE_BOUNDING_BOX_ANNOTATION = 2; + + // Oriented bounding box. The box does not have to be parallel to horizontal + // line. + IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION = 13; + + // Bounding poly annotations in an image. + IMAGE_BOUNDING_POLY_ANNOTATION = 10; + + // Polyline annotations in an image. + IMAGE_POLYLINE_ANNOTATION = 11; + + // Segmentation annotations in an image. + IMAGE_SEGMENTATION_ANNOTATION = 12; + + // Classification annotations in video shots. + VIDEO_SHOTS_CLASSIFICATION_ANNOTATION = 3; + + // Video object tracking annotation. + VIDEO_OBJECT_TRACKING_ANNOTATION = 4; + + // Video object detection annotation. + VIDEO_OBJECT_DETECTION_ANNOTATION = 5; + + // Video event annotation. + VIDEO_EVENT_ANNOTATION = 6; + + // Speech to text annotation. + AUDIO_TRANSCRIPTION_ANNOTATION = 7; + + // Classification for text. + TEXT_CLASSIFICATION_ANNOTATION = 8; + + // Entity extraction for text. + TEXT_ENTITY_EXTRACTION_ANNOTATION = 9; +} + +// Annotation for Example. Each example may have one or more annotations. For +// example in image classification problem, each image might have one or more +// labels. We call labels binded with this image an Annotation. +message Annotation { + // Output only. Unique name of this annotation, format is: + // + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id} + string name = 1; + + // Output only. The source of the annotation. + AnnotationSource annotation_source = 2; + + // Output only. This is the actual annotation value, e.g classification, + // bounding box values are stored here. + AnnotationValue annotation_value = 3; + + // Output only. Annotation metadata, including information like votes + // for labels. + AnnotationMetadata annotation_metadata = 4; + + // Output only. Sentiment for this annotation. + AnnotationSentiment annotation_sentiment = 6; +} + +// Annotation value for an example. +message AnnotationValue { + oneof value_type { + // Annotation value for image classification case. + ImageClassificationAnnotation image_classification_annotation = 1; + + // Annotation value for image bounding box, oriented bounding box + // and polygon cases. + ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2; + + // Annotation value for image polyline cases. + // Polyline here is different from BoundingPoly. It is formed by + // line segments connected to each other but not closed form(Bounding Poly). + // The line segments can cross each other. + ImagePolylineAnnotation image_polyline_annotation = 8; + + // Annotation value for image segmentation. + ImageSegmentationAnnotation image_segmentation_annotation = 9; + + // Annotation value for text classification case. + TextClassificationAnnotation text_classification_annotation = 3; + + // Annotation value for video classification case. + VideoClassificationAnnotation video_classification_annotation = 4; + + // Annotation value for video object detection and tracking case. + VideoObjectTrackingAnnotation video_object_tracking_annotation = 5; + + // Annotation value for video event case. + VideoEventAnnotation video_event_annotation = 6; + + // Annotation value for speech audio recognition case. + AudioRecognitionAnnotation audio_recognition_annotation = 7; + } +} + +// Image classification annotation definition. +message ImageClassificationAnnotation { + // Label of image. + AnnotationSpec annotation_spec = 1; +} + +// A vertex represents a 2D point in the image. +// NOTE: the vertex coordinates are in the same scale as the original image. +message Vertex { + // X coordinate. + int32 x = 1; + + // Y coordinate. + int32 y = 2; +} + +// A vertex represents a 2D point in the image. +// NOTE: the normalized vertex coordinates are relative to the original image +// and range from 0 to 1. +message NormalizedVertex { + // X coordinate. + float x = 1; + + // Y coordinate. + float y = 2; +} + +// A bounding polygon in the image. +message BoundingPoly { + // The bounding polygon vertices. + repeated Vertex vertices = 1; +} + +// Normalized bounding polygon. +message NormalizedBoundingPoly { + // The bounding polygon normalized vertices. + repeated NormalizedVertex normalized_vertices = 1; +} + +// Image bounding poly annotation. It represents a polygon including +// bounding box in the image. +message ImageBoundingPolyAnnotation { + // The region of the polygon. If it is a bounding box, it is guaranteed to be + // four points. + oneof bounded_area { + BoundingPoly bounding_poly = 2; + + NormalizedBoundingPoly normalized_bounding_poly = 3; + } + + // Label of object in this bounding polygon. + AnnotationSpec annotation_spec = 1; +} + +// A line with multiple line segments. +message Polyline { + // The polyline vertices. + repeated Vertex vertices = 1; +} + +// Normalized polyline. +message NormalizedPolyline { + // The normalized polyline vertices. + repeated NormalizedVertex normalized_vertices = 1; +} + +// A polyline for the image annotation. +message ImagePolylineAnnotation { + oneof poly { + Polyline polyline = 2; + + NormalizedPolyline normalized_polyline = 3; + } + + // Label of this polyline. + AnnotationSpec annotation_spec = 1; +} + +// Image segmentation annotation. +message ImageSegmentationAnnotation { + // The mapping between rgb color and annotation spec. The key is the rgb + // color represented in format of rgb(0, 0, 0). The value is the + // AnnotationSpec. + map annotation_colors = 1; + + // Image format. + string mime_type = 2; + + // A byte string of a full image's color map. + bytes image_bytes = 3; +} + +// Text classification annotation. +message TextClassificationAnnotation { + // Label of the text. + AnnotationSpec annotation_spec = 1; +} + +// A time period inside of an example that has a time dimension (e.g. video). +message TimeSegment { + // Start of the time segment (inclusive), represented as the duration since + // the example start. + google.protobuf.Duration start_time_offset = 1; + + // End of the time segment (exclusive), represented as the duration since the + // example start. + google.protobuf.Duration end_time_offset = 2; +} + +// Video classification annotation. +message VideoClassificationAnnotation { + // The time segment of the video to which the annotation applies. + TimeSegment time_segment = 1; + + // Label of the segment specified by time_segment. + AnnotationSpec annotation_spec = 2; +} + +// Video frame level annotation for object detection and tracking. +message ObjectTrackingFrame { + // The bounding box location of this object track for the frame. + oneof bounded_area { + BoundingPoly bounding_poly = 1; + + NormalizedBoundingPoly normalized_bounding_poly = 2; + } + + // The time offset of this frame relative to the beginning of the video. + google.protobuf.Duration time_offset = 3; +} + +// Video object tracking annotation. +message VideoObjectTrackingAnnotation { + // Label of the object tracked in this annotation. + AnnotationSpec annotation_spec = 1; + + // The time segment of the video to which object tracking applies. + TimeSegment time_segment = 2; + + // The list of frames where this object track appears. + repeated ObjectTrackingFrame object_tracking_frames = 3; +} + +// Video event annotation. +message VideoEventAnnotation { + // Label of the event in this annotation. + AnnotationSpec annotation_spec = 1; + + // The time segment of the video to which the annotation applies. + TimeSegment time_segment = 2; +} + +// Speech audio recognition. +message AudioRecognitionAnnotation { + // Transcript text representing the words spoken. + string transcript = 1; + + // Start position in audio file that the transcription corresponds to. + google.protobuf.Duration start_offset = 2; + + // End position in audio file that the transcription corresponds to. + google.protobuf.Duration end_offset = 3; +} + +// Additional information associated with the annotation. +message AnnotationMetadata { + // Metadata related to human labeling. + OperatorMetadata operator_metadata = 2; +} + +// General information useful for labels coming from contributors. +message OperatorMetadata { + // Confidence score corresponding to a label. For examle, if 3 contributors + // have answered the question and 2 of them agree on the final label, the + // confidence score will be 0.67 (2/3). + float score = 1; + + // The total number of contributors that answer this question. + int32 total_votes = 2; + + // The total number of contributors that choose this label. + int32 label_votes = 3; + + repeated string comments = 4; +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto new file mode 100644 index 000000000000..20fdec73c4d9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto @@ -0,0 +1,56 @@ +// 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. +// + +syntax = "proto3"; + +package google.cloud.datalabeling.v1beta1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datalabeling.v1beta1"; + + +// AnnotationSpecSet is a collection of label definitions. For example, in +// image classification tasks, we define a set of labels, this set is called +// AnnotationSpecSet. AnnotationSpecSet is immutable upon creation. +message AnnotationSpecSet { + // Output only. + // AnnotationSpecSet resource name, format: + // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id} + string name = 1; + + // Required. The display name for AnnotationSpecSet defined by user. + // Maximum of 64 characters. + string display_name = 2; + + // Optional. User-provided description of the annotation specification set. + // The description can be up to 10000 characters long. + string description = 3; + + // Required. The actual spec set defined by the users. + repeated AnnotationSpec annotation_specs = 4; +} + +// Container of information related to one annotation spec. +message AnnotationSpec { + // Required. The display name of the AnnotationSpec. Maximum of 64 characters. + string display_name = 1; + + // Optional. User-provided description of the annotation specification. + // The description can be up to 10000 characters long. + string description = 2; +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/data_labeling_service.proto b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/data_labeling_service.proto new file mode 100644 index 000000000000..22222ab7128a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/data_labeling_service.proto @@ -0,0 +1,728 @@ +// 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. +// + +syntax = "proto3"; + +package google.cloud.datalabeling.v1beta1; + +import "google/api/annotations.proto"; +import "google/cloud/datalabeling/v1beta1/annotation_spec_set.proto"; +import "google/cloud/datalabeling/v1beta1/dataset.proto"; +import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto"; +import "google/cloud/datalabeling/v1beta1/instruction.proto"; +import "google/cloud/datalabeling/v1beta1/operations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datalabeling.v1beta1"; + + +service DataLabelingService { + // Creates dataset. If success return a Dataset resource. + rpc CreateDataset(CreateDatasetRequest) returns (Dataset) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/datasets" + body: "*" + }; + } + + // Gets dataset by resource name. + rpc GetDataset(GetDatasetRequest) returns (Dataset) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/datasets/*}" + }; + } + + // Lists datasets under a project. Pagination is supported. + rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/datasets" + }; + } + + // Deletes a dataset by resource name. + rpc DeleteDataset(DeleteDatasetRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/datasets/*}" + }; + } + + // Imports data into dataset based on source locations defined in request. + // It can be called multiple times for the same dataset. Each dataset can + // only have one long running operation running on it. For example, no + // labeling task (also long running operation) can be started while + // importing is still ongoing. Vice versa. + rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/datasets/*}:importData" + body: "*" + }; + } + + // Exports data and annotations from dataset. + rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/datasets/*}:exportData" + body: "*" + }; + } + + // Gets a data item in a dataset by resource name. This API can be + // called after data are imported into dataset. + rpc GetDataItem(GetDataItemRequest) returns (DataItem) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/datasets/*/dataItems/*}" + }; + } + + // Lists data items in a dataset. This API can be called after data + // are imported into dataset. Pagination is supported. + rpc ListDataItems(ListDataItemsRequest) returns (ListDataItemsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/datasets/*}/dataItems" + }; + } + + // Gets an annotated dataset by resource name. + rpc GetAnnotatedDataset(GetAnnotatedDatasetRequest) returns (AnnotatedDataset) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*}" + }; + } + + // Lists annotated datasets for a dataset. Pagination is supported. + rpc ListAnnotatedDatasets(ListAnnotatedDatasetsRequest) returns (ListAnnotatedDatasetsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/datasets/*}/annotatedDatasets" + }; + } + + // Deletes an annotated dataset by resource name. + rpc DeleteAnnotatedDataset(DeleteAnnotatedDatasetRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*}" + }; + } + + // Starts a labeling task for image. The type of image labeling task is + // configured by feature in the request. + rpc LabelImage(LabelImageRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/datasets/*}/image:label" + body: "*" + }; + } + + // Starts a labeling task for video. The type of video labeling task is + // configured by feature in the request. + rpc LabelVideo(LabelVideoRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/datasets/*}/video:label" + body: "*" + }; + } + + // Starts a labeling task for text. The type of text labeling task is + // configured by feature in the request. + rpc LabelText(LabelTextRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/datasets/*}/text:label" + body: "*" + }; + } + + // Starts a labeling task for audio. The type of audio labeling task is + // configured by feature in the request. + rpc LabelAudio(LabelAudioRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/datasets/*}/audio:label" + body: "*" + }; + } + + // Gets an example by resource name, including both data and annotation. + rpc GetExample(GetExampleRequest) returns (Example) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/datasets/*/annotatedDatasets/*/examples/*}" + }; + } + + // Lists examples in an annotated dataset. Pagination is supported. + rpc ListExamples(ListExamplesRequest) returns (ListExamplesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/datasets/*/annotatedDatasets/*}/examples" + }; + } + + // Creates an annotation spec set by providing a set of labels. + rpc CreateAnnotationSpecSet(CreateAnnotationSpecSetRequest) returns (AnnotationSpecSet) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/annotationSpecSets" + body: "*" + }; + } + + // Gets an annotation spec set by resource name. + rpc GetAnnotationSpecSet(GetAnnotationSpecSetRequest) returns (AnnotationSpecSet) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/annotationSpecSets/*}" + }; + } + + // Lists annotation spec sets for a project. Pagination is supported. + rpc ListAnnotationSpecSets(ListAnnotationSpecSetsRequest) returns (ListAnnotationSpecSetsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/annotationSpecSets" + }; + } + + // Deletes an annotation spec set by resource name. + rpc DeleteAnnotationSpecSet(DeleteAnnotationSpecSetRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/annotationSpecSets/*}" + }; + } + + // Creates an instruction for how data should be labeled. + rpc CreateInstruction(CreateInstructionRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*}/instructions" + body: "*" + }; + } + + // Gets an instruction by resource name. + rpc GetInstruction(GetInstructionRequest) returns (Instruction) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/instructions/*}" + }; + } + + // Lists instructions for a project. Pagination is supported. + rpc ListInstructions(ListInstructionsRequest) returns (ListInstructionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*}/instructions" + }; + } + + // Deletes an instruction object by resource name. + rpc DeleteInstruction(DeleteInstructionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/instructions/*}" + }; + } +} + +// Request message for CreateDataset. +message CreateDatasetRequest { + // Required. Dataset resource parent, format: + // projects/{project_id} + string parent = 1; + + // Required. The dataset to be created. + Dataset dataset = 2; +} + +// Request message for GetDataSet. +message GetDatasetRequest { + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + string name = 1; +} + +// Request message for ListDataset. +message ListDatasetsRequest { + // Required. Dataset resource parent, format: + // projects/{project_id} + string parent = 1; + + // Optional. Filter on dataset is not supported at this moment. + string filter = 2; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDatasetsResponse.next_page_token] of the previous + // [DataLabelingService.ListDatasets] call. + // Returns the first page if empty. + string page_token = 4; +} + +// Results of listing datasets within a project. +message ListDatasetsResponse { + // The list of datasets to return. + repeated Dataset datasets = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for DeleteDataset. +message DeleteDatasetRequest { + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + string name = 1; +} + +// Request message for ImportData API. +message ImportDataRequest { + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + string name = 1; + + // Required. Specify the input source of the data. + InputConfig input_config = 2; +} + +// Request message for ExportData API. +message ExportDataRequest { + // Required. Dataset resource name, format: + // projects/{project_id}/datasets/{dataset_id} + string name = 1; + + // Required. Annotated dataset resource name. DataItem in + // Dataset and their annotations in specified annotated dataset will be + // exported. It's in format of + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id} + string annotated_dataset = 2; + + // Optional. Filter is not supported at this moment. + string filter = 3; + + // Required. Specify the output destination. + OutputConfig output_config = 4; +} + +// Request message for GetDataItem. +message GetDataItemRequest { + // Required. The name of the data item to get, format: + // projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id} + string name = 1; +} + +// Request message for ListDataItems. +message ListDataItemsRequest { + // Required. Name of the dataset to list data items, format: + // projects/{project_id}/datasets/{dataset_id} + string parent = 1; + + // Optional. Filter is not supported at this moment. + string filter = 2; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListDataItemsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListDataItemsResponse.next_page_token] of the previous + // [DataLabelingService.ListDataItems] call. + // Return first page if empty. + string page_token = 4; +} + +// Results of listing data items in a dataset. +message ListDataItemsResponse { + // The list of data items to return. + repeated DataItem data_items = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for GetAnnotatedDataset. +message GetAnnotatedDatasetRequest { + // Required. Name of the annotated dataset to get, format: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id} + string name = 1; +} + +// Request message for ListAnnotatedDatasets. +message ListAnnotatedDatasetsRequest { + // Required. Name of the dataset to list annotated datasets, format: + // projects/{project_id}/datasets/{dataset_id} + string parent = 1; + + // Optional. Filter is not supported at this moment. + string filter = 2; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListAnnotatedDatasetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse.next_page_token] of the previous + // [DataLabelingService.ListAnnotatedDatasets] call. + // Return first page if empty. + string page_token = 4; +} + +// Request message for DeleteAnnotatedDataset. +message DeleteAnnotatedDatasetRequest { + // Required. Name of the annotated dataset to delete, format: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id} + string name = 1; +} + +// Results of listing annotated datasets for a dataset. +message ListAnnotatedDatasetsResponse { + // The list of annotated datasets to return. + repeated AnnotatedDataset annotated_datasets = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for starting an image labeling task. +message LabelImageRequest { + // Image labeling task feature. + enum Feature { + FEATURE_UNSPECIFIED = 0; + + // Label whole image with one or more of labels. + CLASSIFICATION = 1; + + // Label image with bounding boxes for labels. + BOUNDING_BOX = 2; + + // Label oriented bounding box. The box does not have to be parallel to + // horizontal line. + ORIENTED_BOUNDING_BOX = 6; + + // Label images with bounding poly. A bounding poly is a plane figure that + // is bounded by a finite chain of straight line segments closing in a loop. + BOUNDING_POLY = 3; + + // Label images with polyline. Polyline is formed by connected line segments + // which are not in closed form. + POLYLINE = 4; + + // Label images with segmentation. Segmentation is different from bounding + // poly since it is more fine-grained, pixel level annotation. + SEGMENTATION = 5; + } + + // Required. Config for labeling tasks. The type of request config must + // match the selected feature. + oneof request_config { + // Configuration for image classification task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config is required. + ImageClassificationConfig image_classification_config = 4; + + // Configuration for bounding box and bounding poly task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config is required. + BoundingPolyConfig bounding_poly_config = 5; + + // Configuration for polyline task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config is required. + PolylineConfig polyline_config = 6; + + // Configuration for segmentation task. + // One of image_classification_config, bounding_poly_config, + // polyline_config and segmentation_config is required. + SegmentationConfig segmentation_config = 7; + } + + // Required. Name of the dataset to request labeling task, format: + // projects/{project_id}/datasets/{dataset_id} + string parent = 1; + + // Required. Basic human annotation config. + HumanAnnotationConfig basic_config = 2; + + // Required. The type of image labeling task. + Feature feature = 3; +} + +// Request message for LabelVideo. +message LabelVideoRequest { + // Video labeling task feature. + enum Feature { + FEATURE_UNSPECIFIED = 0; + + // Label whole video or video segment with one or more labels. + CLASSIFICATION = 1; + + // Label objects with bounding box on image frames extracted from the video. + OBJECT_DETECTION = 2; + + // Label and track objects in video. + OBJECT_TRACKING = 3; + + // Label the range of video for the specified events. + EVENT = 4; + } + + // Required. Config for labeling tasks. The type of request config must + // match the selected feature. + oneof request_config { + // Configuration for video classification task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + VideoClassificationConfig video_classification_config = 4; + + // Configuration for video object detection task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + ObjectDetectionConfig object_detection_config = 5; + + // Configuration for video object tracking task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + ObjectTrackingConfig object_tracking_config = 6; + + // Configuration for video event task. + // One of video_classification_config, object_detection_config, + // object_tracking_config and event_config is required. + EventConfig event_config = 7; + } + + // Required. Name of the dataset to request labeling task, format: + // projects/{project_id}/datasets/{dataset_id} + string parent = 1; + + // Required. Basic human annotation config. + HumanAnnotationConfig basic_config = 2; + + // Required. The type of video labeling task. + Feature feature = 3; +} + +// Request message for LabelText. +message LabelTextRequest { + // Text labeling task feature. + enum Feature { + FEATURE_UNSPECIFIED = 0; + + // Label text content to one of more labels. + TEXT_CLASSIFICATION = 1; + + // Label entities and their span in text. + TEXT_ENTITY_EXTRACTION = 2; + } + + // Required. Config for labeling tasks. The type of request config must + // match the selected feature. + oneof request_config { + // Configuration for text classification task. + // One of text_classification_config and text_entity_extraction_config + // is required. + TextClassificationConfig text_classification_config = 4; + + // Configuration for entity extraction task. + // One of text_classification_config and text_entity_extraction_config + // is required. + TextEntityExtractionConfig text_entity_extraction_config = 5; + } + + // Required. Name of the data set to request labeling task, format: + // projects/{project_id}/datasets/{dataset_id} + string parent = 1; + + // Required. Basic human annotation config. + HumanAnnotationConfig basic_config = 2; + + // Required. The type of text labeling task. + Feature feature = 6; +} + +// Request message for LabelAudio. +message LabelAudioRequest { + // Audio labeling task feature. + enum Feature { + FEATURE_UNSPECIFIED = 0; + + // Transcribe the audios into text. + AUDIO_TRANSCRIPTION = 1; + } + + // Required. Name of the dataset to request labeling task, format: + // projects/{project_id}/datasets/{dataset_id} + string parent = 1; + + // Required. Basic human annotation config. + HumanAnnotationConfig basic_config = 2; + + // Required. The type of audio labeling task. + Feature feature = 3; +} + +// Request message for GetExample +message GetExampleRequest { + // Required. Name of example, format: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id}/examples/{example_id} + string name = 1; + + // Optional. An expression for filtering Examples. Filter by + // annotation_spec.display_name is supported. Format + // "annotation_spec.display_name = {display_name}" + string filter = 2; +} + +// Request message for ListExamples. +message ListExamplesRequest { + // Required. Example resource parent. + string parent = 1; + + // Optional. An expression for filtering Examples. For annotated datasets that + // have annotation spec set, filter by + // annotation_spec.display_name is supported. Format + // "annotation_spec.display_name = {display_name}" + string filter = 2; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListExamplesResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListExamplesResponse.next_page_token] of the previous + // [DataLabelingService.ListExamples] call. + // Return first page if empty. + string page_token = 4; +} + +// Results of listing Examples in and annotated dataset. +message ListExamplesResponse { + // The list of examples to return. + repeated Example examples = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for CreateAnnotationSpecSet. +message CreateAnnotationSpecSetRequest { + // Required. AnnotationSpecSet resource parent, format: + // projects/{project_id} + string parent = 1; + + // Required. Annotation spec set to create. Annotation specs must be included. + // Only one annotation spec will be accepted for annotation specs with same + // display_name. + AnnotationSpecSet annotation_spec_set = 2; +} + +// Request message for GetAnnotationSpecSet. +message GetAnnotationSpecSetRequest { + // Required. AnnotationSpecSet resource name, format: + // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id} + string name = 1; +} + +// Request message for ListAnnotationSpecSets. +message ListAnnotationSpecSetsRequest { + // Required. Parent of AnnotationSpecSet resource, format: + // projects/{project_id} + string parent = 1; + + // Optional. Filter is not supported at this moment. + string filter = 2; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListAnnotationSpecSetsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse.next_page_token] of the previous + // [DataLabelingService.ListAnnotationSpecSets] call. + // Return first page if empty. + string page_token = 4; +} + +// Results of listing annotation spec set under a project. +message ListAnnotationSpecSetsResponse { + // The list of annotation spec sets. + repeated AnnotationSpecSet annotation_spec_sets = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} + +// Request message for DeleteAnnotationSpecSet. +message DeleteAnnotationSpecSetRequest { + // Required. AnnotationSpec resource name, format: + // `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`. + string name = 1; +} + +// Request message for CreateInstruction. +message CreateInstructionRequest { + // Required. Instruction resource parent, format: + // projects/{project_id} + string parent = 1; + + // Required. Instruction of how to perform the labeling task. + Instruction instruction = 2; +} + +// Request message for GetInstruction. +message GetInstructionRequest { + // Required. Instruction resource name, format: + // projects/{project_id}/instructions/{instruction_id} + string name = 1; +} + +// Request message for DeleteInstruction. +message DeleteInstructionRequest { + // Required. Instruction resource name, format: + // projects/{project_id}/instructions/{instruction_id} + string name = 1; +} + +// Request message for ListInstructions. +message ListInstructionsRequest { + // Required. Instruction resource parent, format: + // projects/{project_id} + string parent = 1; + + // Optional. Filter is not supported at this moment. + string filter = 2; + + // Optional. Requested page size. Server may return fewer results than + // requested. Default value is 100. + int32 page_size = 3; + + // Optional. A token identifying a page of results for the server to return. + // Typically obtained by + // [ListInstructionsResponse.next_page_token][google.cloud.datalabeling.v1beta1.ListInstructionsResponse.next_page_token] of the previous + // [DataLabelingService.ListInstructions] call. + // Return first page if empty. + string page_token = 4; +} + +// Results of listing instructions under a project. +message ListInstructionsResponse { + // The list of Instructions to return. + repeated Instruction instructions = 1; + + // A token to retrieve next page of results. + string next_page_token = 2; +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/dataset.proto b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/dataset.proto new file mode 100644 index 000000000000..952daf38d626 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/dataset.proto @@ -0,0 +1,306 @@ +// 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. +// + +syntax = "proto3"; + +package google.cloud.datalabeling.v1beta1; + +import "google/cloud/datalabeling/v1beta1/annotation.proto"; +import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datalabeling.v1beta1"; + + +enum DataType { + DATA_TYPE_UNSPECIFIED = 0; + + IMAGE = 1; + + VIDEO = 2; + + TEXT = 4; + + AUDIO = 5; +} + +// Dataset is the resource to hold your data. You can request multiple labeling +// tasks for a dataset while each one will generate an AnnotatedDataset. +message Dataset { + // Output only. + // Dataset resource name, format is: + // projects/{project_id}/datasets/{dataset_id} + string name = 1; + + // Required. The display name of the dataset. Maximum of 64 characters. + string display_name = 2; + + // Optional. User-provided description of the annotation specification set. + // The description can be up to 10000 characters long. + string description = 3; + + // Output only. Time the dataset is created. + google.protobuf.Timestamp create_time = 4; + + // Output only. This is populated with the original input configs + // where ImportData is called. It is available only after the clients + // import data to this dataset. + repeated InputConfig input_configs = 5; +} + +// The configuration of input data, including data type, location, etc. +message InputConfig { + // Required. Where the data is from. + oneof source { + GcsSource gcs_source = 2; + } + + // Required. Data type must be specifed when user tries to import data. + DataType data_type = 1; +} + +// Source of the GCS file to be imported. Only gcs path is allowed in +// input_uri. +message GcsSource { + // Required. The input uri of source file. + string input_uri = 1; + + // Required. The format of the gcs source. Only "text/csv" is supported. + string mime_type = 2; +} + +// The configuration of output data. +message OutputConfig { + // Required. Location to output data to. + oneof destination { + // Output to a GCS file. Should be used for labeling output other than Audio + // transcription. + GcsDestination gcs_destination = 1; + + // Output to a GCS folder. Should be used for Audio transcription + // labeling output. + GcsFolderDestination gcs_folder_destination = 2; + } +} + +// Export destination of the data.Only gcs path is allowed in +// output_uri. +message GcsDestination { + // Required. The output uri of destination file. + string output_uri = 1; + + // Required. The format of the gcs destination. Only "text/csv" and + // "application/json" + // are supported. + string mime_type = 2; +} + +// Export folder destination of the data. +message GcsFolderDestination { + // Required. GCS folder to export data to. + string output_folder_uri = 1; +} + +// DataItem is a piece of data, without annotation. For example, an image. +message DataItem { + // Output only. + oneof payload { + // The image payload, a container of the image bytes/uri. + ImagePayload image_payload = 2; + + // The text payload, a container of text content. + TextPayload text_payload = 3; + + // The video payload, a container of the video uri. + VideoPayload video_payload = 4; + + // The audio payload, a container of the audio uri. + AudioPayload audio_payload = 5; + } + + // Output only. Name of the data item, in format of: + // projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id} + string name = 1; +} + +// AnnotatedDataset is a set holding annotations for data in a Dataset. Each +// labeling task will generate an AnnotatedDataset under the Dataset that the +// task is requested for. +message AnnotatedDataset { + // Output only. + // AnnotatedDataset resource name in format of: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id} + string name = 1; + + // Output only. The display name of the AnnotatedDataset. It is specified in + // HumanAnnotationConfig when user starts a labeling task. Maximum of 64 + // characters. + string display_name = 2; + + // Output only. The description of the AnnotatedDataset. It is specified in + // HumanAnnotationConfig when user starts a labeling task. Maximum of 10000 + // characters. + string description = 9; + + // Output only. Source of the annotation. + AnnotationSource annotation_source = 3; + + // Output only. Type of the annotation. It is specified when starting labeling + // task. + AnnotationType annotation_type = 8; + + // Output only. Number of examples in the annotated dataset. + int64 example_count = 4; + + // Output only. Number of examples that have annotation in the annotated + // dataset. + int64 completed_example_count = 5; + + // Output only. Per label statistics. + LabelStats label_stats = 6; + + // Output only. Time the AnnotatedDataset was created. + google.protobuf.Timestamp create_time = 7; + + // Output only. Additional information about AnnotatedDataset. + AnnotatedDatasetMetadata metadata = 10; +} + +// Metadata on AnnotatedDataset. +message AnnotatedDatasetMetadata { + // HumanAnnotationConfig used when requesting the human labeling task for this + // AnnotatedDataset. + HumanAnnotationConfig human_annotation_config = 1; + + // Specific request configuration used when requesting the labeling task. + oneof annotation_request_config { + // Configuration for image classification task. + ImageClassificationConfig image_classification_config = 2; + // Configuration for image bounding box and bounding poly task. + BoundingPolyConfig bounding_poly_config = 3; + // Configuration for image polyline task. + PolylineConfig polyline_config = 4; + // Configuration for image segmentation task. + SegmentationConfig segmentation_config = 5; + // Configuration for video classification task. + VideoClassificationConfig video_classification_config = 6; + // Configuration for video object detection task. + ObjectDetectionConfig object_detection_config = 7; + // Configuration for video object tracking task. + ObjectTrackingConfig object_tracking_config = 8; + // Configuration for video event labeling task. + EventConfig event_config = 9; + // Configuration for text classification task. + TextClassificationConfig text_classification_config = 10; + // Configuration for text entity extraction task. + TextEntityExtractionConfig text_entity_extraction_config = 11; + } +} + +// Statistics about annotation specs. +message LabelStats { + // Map of each annotation spec's example count. Key is the annotation spec + // name and value is the number of examples for that annotation spec. + map example_count = 1; +} + +// An Example is a piece of data and its annotation. For example, an image with +// label "house". +message Example { + // Output only. The data part of Example. + oneof payload { + // The image payload, a container of the image bytes/uri. + ImagePayload image_payload = 2; + + // The text payload, a container of the text content. + TextPayload text_payload = 6; + + // The video payload, a container of the video uri. + VideoPayload video_payload = 7; + + // The audio payload, a container of the audio uri. + AudioPayload audio_payload = 8; + } + + // Output only. Name of the example, in format of: + // projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + // {annotated_dataset_id}/examples/{example_id} + string name = 1; + + // Output only. Annotations for the piece of data in Example. + // One piece of data can have multiple annotations. + repeated Annotation annotations = 5; +} + +// Container of information about an image. +message ImagePayload { + // Image format. + string mime_type = 1; + + // A byte string of a full image. + bytes image_thumbnail = 2; + + // Image uri from the user bucket. + string image_uri = 3; +} + +// Container of information about a piece of text. +message TextPayload { + // Text content. + string text_content = 1; +} + +// Container of information of a video thumbnail. +message VideoThumbnail { + // A byte string of the video frame. + bytes thumbnail = 1; + + // Time offset relative to the beginning of the video, corresponding to the + // video frame where the thumbnail has been extracted from. + google.protobuf.Duration time_offset = 2; +} + +// Container of information of a video. +message VideoPayload { + // Video format. + string mime_type = 1; + + // Video uri from the user bucket. + string video_uri = 2; + + // The list of video thumbnails. + repeated VideoThumbnail video_thumbnails = 3; + + // FPS of the video. + float frame_rate = 4; +} + +// Container of information of an audio. +message AudioPayload { + // Audio uri in user bucket. + string audio_uri = 1; + + // Sample rate in Hertz of the audio data sent in all + // `RecognitionAudio` messages. This field is optional for `FLAC` and `WAV` + // audio files and required for all other audio formats. For details, + // see [AudioEncoding][google.cloud.datalabeling.v1beta1.AudioPayload.AudioEncoding]. + int32 sample_rate_hertz = 3; +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/human_annotation_config.proto b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/human_annotation_config.proto new file mode 100644 index 000000000000..96672aedaf53 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/human_annotation_config.proto @@ -0,0 +1,208 @@ +// 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. +// + +syntax = "proto3"; + +package google.cloud.datalabeling.v1beta1; + +import "google/protobuf/duration.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datalabeling.v1beta1"; + + +enum StringAggregationType { + STRING_AGGREGATION_TYPE_UNSPECIFIED = 0; + + // Majority vote to aggregate answers. + MAJORITY_VOTE = 1; + + // Unanimous answers will be adopted. + UNANIMOUS_VOTE = 2; + + // Preserve all answers by crowd compute. + NO_AGGREGATION = 3; +} + +// Configuration for how human labeling task should be done. +message HumanAnnotationConfig { + // Required except for LabelAudio case. Instruction resource name. + string instruction = 1; + + // Required. A human-readable name for AnnotatedDataset defined by + // users. Maximum of 64 characters + // . + string annotated_dataset_display_name = 2; + + // Optional. A human-readable description for AnnotatedDataset. + // The description can be up to 10000 characters long. + string annotated_dataset_description = 3; + + // Optional. A human-readable label used to logically group labeling tasks. + // This string must match the regular expression `[a-zA-Z\\d_-]{0,128}`. + string label_group = 4; + + // Optional. The Language of this question, as a + // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + // Default value is en-US. + // Only need to set this when task is language related. For example, French + // text classification or Chinese audio transcription. + string language_code = 5; + + // Optional. Replication of questions. Each question will be sent to up to + // this number of contributors to label. Aggregated answers will be returned. + // Default is set to 1. + // For image related labeling, valid values are 1, 3, 5. + int32 replica_count = 6; + + // Optional. Maximum duration for contributors to answer a question. Default + // is 1800 seconds. + google.protobuf.Duration question_duration = 7; + + // Optional. If you want your own labeling contributors to manage and work on + // this labeling request, you can set these contributors here. We will give + // them access to the question types in crowdcompute. Note that these + // emails must be registered in crowdcompute worker UI: + // https://crowd-compute.appspot.com/ + repeated string contributor_emails = 9; +} + +// Config for image classification human labeling task. +message ImageClassificationConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; + + // Optional. If allow_multi_label is true, contributors are able to choose + // multiple labels for one image. + bool allow_multi_label = 2; + + // Optional. The type of how to aggregate answers. + StringAggregationType answer_aggregation_type = 3; +} + +// Config for image bounding poly (and bounding box) human labeling task. +message BoundingPolyConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; + + // Optional. Instruction message showed on contributors UI. + string instruction_message = 2; +} + +// Config for image polyline human labeling task. +message PolylineConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; + + // Optional. Instruction message showed on contributors UI. + string instruction_message = 2; +} + +// Config for image segmentation +message SegmentationConfig { + // Required. Annotation spec set resource name. format: + // projects/{project_id}/annotationSpecSets/{annotation_spec_set_id} + string annotation_spec_set = 1; + + // Instruction message showed on labelers UI. + string instruction_message = 2; +} + +// Config for video classification human labeling task. +// Currently two types of video classification are supported: +// 1. Assign labels on the entire video. +// 2. Split the video into multiple video clips based on camera shot, and +// assign labels on each video clip. +message VideoClassificationConfig { + // Annotation spec set with the setting of allowing multi labels or not. + message AnnotationSpecSetConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; + + // Optional. If allow_multi_label is true, contributors are able to + // choose multiple labels from one annotation spec set. + bool allow_multi_label = 2; + } + + // Required. The list of annotation spec set configs. + // Since watching a video clip takes much longer time than an image, we + // support label with multiple AnnotationSpecSet at the same time. Labels + // in each AnnotationSpecSet will be shown in a group to contributors. + // Contributors can select one or more (depending on whether to allow multi + // label) from each group. + repeated AnnotationSpecSetConfig annotation_spec_set_configs = 1; + + // Optional. Option to apply shot detection on the video. + bool apply_shot_detection = 2; +} + +// Config for video object detection human labeling task. +// Object detection will be conducted on the images extracted from the video, +// and those objects will be labeled with bounding boxes. +// User need to specify the number of images to be extracted per second as the +// extraction frame rate. +message ObjectDetectionConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; + + // Optional. Instruction message showed on labelers UI. + string instruction_message = 2; + + // Required. Number of frames per second to be extracted from the video. + double extraction_frame_rate = 3; +} + +// Config for video object tracking human labeling task. +message ObjectTrackingConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; +} + +// Config for video event human labeling task. +message EventConfig { + // Required. The list of annotation spec set resource name. Similar to video + // classification, we support selecting event from multiple AnnotationSpecSet + // at the same time. + repeated string annotation_spec_sets = 1; +} + +// Config for text classification human labeling task. +message TextClassificationConfig { + // Optional. If allow_multi_label is true, contributors are able to choose + // multiple labels for one text segment. + bool allow_multi_label = 1; + + // Required. Annotation spec set resource name. + string annotation_spec_set = 2; + + // Optional. Configs for sentiment selection. + SentimentConfig sentiment_config = 3; +} + +// Config for setting up sentiments. +message SentimentConfig { + // If set to true, contributors will have the option to select sentiment of + // the label they selected, to mark it as negative or positive label. Default + // is false. + bool enable_label_sentiment_selection = 1; +} + +// Config for text entity extraction human labeling task. +message TextEntityExtractionConfig { + // Required. Annotation spec set resource name. + string annotation_spec_set = 1; +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/instruction.proto b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/instruction.proto new file mode 100644 index 000000000000..d1a1e751c9a3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/instruction.proto @@ -0,0 +1,78 @@ +// 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. +// + +syntax = "proto3"; + +package google.cloud.datalabeling.v1beta1; + +import "google/cloud/datalabeling/v1beta1/dataset.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datalabeling.v1beta1"; + + +// Instruction of how to perform the labeling task for human operators. +// Currently two types of instruction are supported - CSV file and PDF. +// One of the two types instruction must be provided. +// CSV file is only supported for image classification task. Instructions for +// other task should be provided as PDF. +// For image classification, CSV and PDF can be provided at the same time. +message Instruction { + // Output only. Instruction resource name, format: + // projects/{project_id}/instructions/{instruction_id} + string name = 1; + + // Required. The display name of the instruction. Maximum of 64 characters. + string display_name = 2; + + // Optional. User-provided description of the instruction. + // The description can be up to 10000 characters long. + string description = 3; + + // Output only. Creation time of instruction. + google.protobuf.Timestamp create_time = 4; + + // Output only. Last update time of instruction. + google.protobuf.Timestamp update_time = 5; + + // Required. The data type of this instruction. + DataType data_type = 6; + + // One of CSV and PDF instruction is required. + // Instruction from a csv file, such as for classification task. + // Csv file should have exact two columns, in the format of: + // The first column is labeled data, such as image reference, text. + // The second column is comma separated labels associated with data. + CsvInstruction csv_instruction = 7; + + // One of CSV and PDF instruction is required. + // Instruction from a PDF doc. The PDF doc should be in GCS bucket. + PdfInstruction pdf_instruction = 9; +} + +// Instruction from a CSV file. +message CsvInstruction { + // CSV file for the instruction. Only gcs path is allowed. + string gcs_file_uri = 1; +} + +// Instruction from a PDF file. +message PdfInstruction { + // PDF file for the instruction. Only gcs path is allowed. + string gcs_file_uri = 1; +} diff --git a/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/operations.proto b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/operations.proto new file mode 100644 index 000000000000..71815e5310e3 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-datalabeling-v1beta1/src/main/proto/google/cloud/datalabeling/v1beta1/operations.proto @@ -0,0 +1,206 @@ +// 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. +// + +syntax = "proto3"; + +package google.cloud.datalabeling.v1beta1; + +import "google/cloud/datalabeling/v1beta1/dataset.proto"; +import "google/cloud/datalabeling/v1beta1/human_annotation_config.proto"; +import "google/cloud/datalabeling/v1beta1/instruction.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/datalabeling/v1beta1;datalabeling"; +option java_multiple_files = true; +option java_package = "com.google.cloud.datalabeling.v1beta1"; + +// Response used for ImportData longrunning operation. +message ImportDataOperationResponse { + // Ouptut only. The name of imported dataset. + string dataset = 1; + + // Output only. Total number of examples requested to import + int32 total_count = 2; + + // Output only. Number of examples imported successfully. + int32 import_count = 3; +} + +// Response used for ExportDataset longrunning operation. +message ExportDataOperationResponse { + // Ouptut only. The name of dataset. + // "projects/*/datasets/*/Datasets/*" + string dataset = 1; + + // Output only. Total number of examples requested to export + int32 total_count = 2; + + // Output only. Number of examples exported successfully. + int32 export_count = 3; + + // Output only. Statistic infos of labels in the exported dataset. + LabelStats label_stats = 4; + + // Output only. output_config in the ExportData request. + OutputConfig output_config = 5; +} + +// Metadata of an ImportData operation. +message ImportDataOperationMetadata { + // Ouptut only. The name of imported dataset. + // "projects/*/datasets/*" + string dataset = 1; + + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + repeated google.rpc.Status partial_failures = 2; +} + +// Metadata of an ExportData operation. +message ExportDataOperationMetadata { + // Output only. The name of dataset to be exported. + // "projects/*/datasets/*/Datasets/*" + string dataset = 1; + + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + repeated google.rpc.Status partial_failures = 2; +} + +// Metadata of a labeling operation, such as LabelImage or LabelVideo. +// Next tag: 16 +message LabelOperationMetadata { + // Output only. Progress of label operation. Range: [0, 100]. + // Currently not supported. + int32 progress_percent = 1; + + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + repeated google.rpc.Status partial_failures = 2; + + // Ouptut only. Details of specific label operation. + oneof details { + LabelImageClassificationOperationMetadata image_classification_details = 3; + LabelImageBoundingBoxOperationMetadata image_bounding_box_details = 4; + LabelImageBoundingPolyOperationMetadata image_bounding_poly_details = 11; + LabelImageOrientedBoundingBoxOperationMetadata + image_oriented_bounding_box_details = 14; + LabelImagePolylineOperationMetadata image_polyline_details = 12; + LabelImageSegmentationOperationMetadata image_segmentation_details = 15; + LabelVideoClassificationOperationMetadata video_classification_details = 5; + LabelVideoObjectDetectionOperationMetadata video_object_detection_details = + 6; + LabelVideoObjectTrackingOperationMetadata video_object_tracking_details = 7; + LabelVideoEventOperationMetadata video_event_details = 8; + LabelTextClassificationOperationMetadata text_classification_details = 9; + LabelAudioTranscriptionOperationMetadata audio_transcription_details = 10; + LabelTextEntityExtractionOperationMetadata text_entity_extraction_details = + 13; + } +} + +// Metadata of a LabelImageClassification operation. +message LabelImageClassificationOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelImageBoundingBox operation metadata. +message LabelImageBoundingBoxOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelImageOrientedBoundingBox operation metadata. +message LabelImageOrientedBoundingBoxOperationMetadata { + // Basic human annotation config. + HumanAnnotationConfig basic_config = 1; +} + +// Details of LabelImageBoundingPoly operation metadata. +message LabelImageBoundingPolyOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of LabelImagePolyline operation metadata. +message LabelImagePolylineOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelImageSegmentation operation metadata. +message LabelImageSegmentationOperationMetadata { + // Basic human annotation config. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelVideoClassification operation metadata. +message LabelVideoClassificationOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelVideoObjectDetection operation metadata. +message LabelVideoObjectDetectionOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelVideoObjectTracking operation metadata. +message LabelVideoObjectTrackingOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelVideoEvent operation metadata. +message LabelVideoEventOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelTextClassification operation metadata. +message LabelTextClassificationOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +message LabelAudioTranscriptionOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Details of a LabelTextEntityExtraction operation metadata. +message LabelTextEntityExtractionOperationMetadata { + // Basic human annotation config used in labeling request. + HumanAnnotationConfig basic_config = 1; +} + +// Metadata of a CreateInstruction operation. +message CreateInstructionMetadata { + // Output only. The name of the created Instruction. + // projects/{project_id}/instructions/{instruction_id} + string instruction = 1; + + // Output only. Partial failures encountered. + // E.g. single files that couldn't be read. + // Status details field will contain standard GCP error details. + repeated google.rpc.Status partial_failures = 2; +} diff --git a/google-cloud-bom/pom.xml b/google-cloud-bom/pom.xml index 15ba2fe45909..5829af1d4ab0 100644 --- a/google-cloud-bom/pom.xml +++ b/google-cloud-bom/pom.xml @@ -354,6 +354,21 @@ google-cloud-core-http 1.67.1-SNAPSHOT
+ + com.google.cloud + google-cloud-datalabeling + 0.85.1-alpha-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-datalabeling-v1beta1 + 0.50.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-datalabeling-v1beta1 + 0.50.1-SNAPSHOT + com.google.cloud google-cloud-dataproc diff --git a/google-cloud-clients/google-cloud-datalabeling/README.md b/google-cloud-clients/google-cloud-datalabeling/README.md new file mode 100644 index 000000000000..6d1c59e95d13 --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/README.md @@ -0,0 +1,98 @@ +Google Cloud Java Client for Cloud Data Labeling +=================================================== + +Java idiomatic client for [Cloud Data Labeling][cloud-datalabeling]. + +[![Kokoro CI](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.svg)](http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/master.html) +[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-datalabeling.svg)](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-datalabeling.svg) +[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/google-cloud-java) + +- [Product Documentation][datalabeling-product-docs] +- [Client Library Documentation][datalabeling-lib-docs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +Quickstart +---------- + +[//]: # ({x-version-update-start:google-cloud-datalabeling:released}) +If you are using Maven, add this to your pom.xml file +```xml + + com.google.cloud + google-cloud-datalabeling + 0.85.0-beta + +``` +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-datalabeling:0.85.0-beta' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-datalabeling" % "0.85.0-beta" +``` +[//]: # ({x-version-update-end}) + +Authentication +-------------- + +See the [Authentication](https://github.com/googleapis/google-cloud-java#authentication) section in the base directory's README. + +About Cloud Labeling +---------------------------- + +See the [Cloud Data Labeling client library docs][datalabeling-lib-docs] to learn how to use this Cloud Data Labeling Client Library. + +Getting Started +--------------- +#### Prerequisites +You will need a [Google Developers Console](https://console.developers.google.com/) project with the Cloud Data Labeling API enabled. [Follow these instructions](https://cloud.google.com/resource-manager/docs/creating-managing-projects) to get your project set up. You will also need to set up the local development environment by [installing the Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +#### Installation and setup +You'll need to obtain the `google-cloud-datalabeling` library. See the [Quickstart](#quickstart) section to add `google-cloud-datalabeling` as a dependency in your code. + +Troubleshooting +--------------- + +To get help, follow the instructions in the [shared Troubleshooting document](https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting). + +Transport +--------- +Cloud Data Labeling uses gRPC for the transport layer. + +Java Versions +------------- + +Java 7 or above is required for using this client. + +Versioning +---------- + +This library follows [Semantic Versioning](http://semver.org/). + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time and the public API should not be considered stable. + +Contributing +------------ + +Contributions to this library are always welcome and highly encouraged. + +See `google-cloud`'s [CONTRIBUTING] documentation and the [shared documentation](https://github.com/googleapis/google-cloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information. + +License +------- + +Apache 2.0 - See [LICENSE] for more information. + + +[CONTRIBUTING]:https://github.com/googleapis/google-cloud-java/blob/master/CONTRIBUTING.md +[code-of-conduct]:https://github.com/googleapis/google-cloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[LICENSE]: https://github.com/googleapis/google-cloud-java/blob/master/LICENSE +[cloud-platform]: https://cloud.google.com/ +[cloud-datalabeling]: http://cloud.google.com/data-labeling/docs/ +[datalabeling-product-docs]: http://cloud.google.com/data-labeling/docs/ +[datalabeling-lib-docs]: https://googleapis.github.io/google-cloud-java/google-cloud-clients/apidocs/index.html?com/google/cloud/datalabeling/v1beta1/package-summary.html diff --git a/google-cloud-clients/google-cloud-datalabeling/pom.xml b/google-cloud-clients/google-cloud-datalabeling/pom.xml new file mode 100644 index 000000000000..d496be1899a6 --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + google-cloud-datalabeling + 0.85.1-beta-SNAPSHOT + jar + Google Cloud Asset + https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/google-cloud-datalabeling + + Java idiomatic client for Google Cloud Asset + + + com.google.cloud + google-cloud-clients + 0.85.1-alpha-SNAPSHOT + + + google-cloud-datalabeling + + + + ${project.groupId} + google-cloud-core-grpc + + + com.google.api.grpc + proto-google-cloud-datalabeling-v1beta1 + + + com.google.api.grpc + grpc-google-cloud-datalabeling-v1beta1 + + + io.grpc + grpc-netty-shaded + + + io.grpc + grpc-stub + + + io.grpc + grpc-auth + + + + + junit + junit + test + + + + com.google.api + gax-grpc + testlib + test + + + diff --git a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java new file mode 100644 index 000000000000..f7f8bc791955 --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClient.java @@ -0,0 +1,3335 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.datalabeling.v1beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +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.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.pathtemplate.PathTemplate; +import com.google.cloud.datalabeling.v1beta1.stub.DataLabelingServiceStub; +import com.google.cloud.datalabeling.v1beta1.stub.DataLabelingServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+ *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+ *   Dataset dataset = Dataset.newBuilder().build();
+ *   Dataset response = dataLabelingServiceClient.createDataset(formattedParent, dataset);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the dataLabelingServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of DataLabelingServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * DataLabelingServiceSettings dataLabelingServiceSettings =
+ *     DataLabelingServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataLabelingServiceClient dataLabelingServiceClient =
+ *     DataLabelingServiceClient.create(dataLabelingServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * DataLabelingServiceSettings dataLabelingServiceSettings =
+ *     DataLabelingServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataLabelingServiceClient dataLabelingServiceClient =
+ *     DataLabelingServiceClient.create(dataLabelingServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataLabelingServiceClient implements BackgroundResource { + private final DataLabelingServiceSettings settings; + private final DataLabelingServiceStub stub; + private final OperationsClient operationsClient; + + private static final PathTemplate PROJECT_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + + private static final PathTemplate ANNOTATION_SPEC_SET_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/annotationSpecSets/{annotation_spec_set}"); + + private static final PathTemplate DATASET_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/datasets/{dataset}"); + + private static final PathTemplate ANNOTATED_DATASET_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}"); + + private static final PathTemplate EXAMPLE_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/datasets/{dataset}/annotatedDatasets/{annotated_dataset}/examples/{example}"); + + private static final PathTemplate DATA_ITEM_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/datasets/{dataset}/dataItems/{data_item}"); + + private static final PathTemplate INSTRUCTION_PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/instructions/{instruction}"); + + /** + * Formats a string containing the fully-qualified path to represent a project resource. + * + * @deprecated Use the {@link ProjectName} class instead. + */ + @Deprecated + public static final String formatProjectName(String project) { + return PROJECT_PATH_TEMPLATE.instantiate("project", project); + } + + /** + * Formats a string containing the fully-qualified path to represent a annotation_spec_set + * resource. + * + * @deprecated Use the {@link AnnotationSpecSetName} class instead. + */ + @Deprecated + public static final String formatAnnotationSpecSetName(String project, String annotationSpecSet) { + return ANNOTATION_SPEC_SET_PATH_TEMPLATE.instantiate( + "project", project, + "annotation_spec_set", annotationSpecSet); + } + + /** + * Formats a string containing the fully-qualified path to represent a dataset resource. + * + * @deprecated Use the {@link DatasetName} class instead. + */ + @Deprecated + public static final String formatDatasetName(String project, String dataset) { + return DATASET_PATH_TEMPLATE.instantiate( + "project", project, + "dataset", dataset); + } + + /** + * Formats a string containing the fully-qualified path to represent a annotated_dataset resource. + * + * @deprecated Use the {@link AnnotatedDatasetName} class instead. + */ + @Deprecated + public static final String formatAnnotatedDatasetName( + String project, String dataset, String annotatedDataset) { + return ANNOTATED_DATASET_PATH_TEMPLATE.instantiate( + "project", project, + "dataset", dataset, + "annotated_dataset", annotatedDataset); + } + + /** + * Formats a string containing the fully-qualified path to represent a example resource. + * + * @deprecated Use the {@link ExampleName} class instead. + */ + @Deprecated + public static final String formatExampleName( + String project, String dataset, String annotatedDataset, String example) { + return EXAMPLE_PATH_TEMPLATE.instantiate( + "project", project, + "dataset", dataset, + "annotated_dataset", annotatedDataset, + "example", example); + } + + /** + * Formats a string containing the fully-qualified path to represent a data_item resource. + * + * @deprecated Use the {@link DataItemName} class instead. + */ + @Deprecated + public static final String formatDataItemName(String project, String dataset, String dataItem) { + return DATA_ITEM_PATH_TEMPLATE.instantiate( + "project", project, + "dataset", dataset, + "data_item", dataItem); + } + + /** + * Formats a string containing the fully-qualified path to represent a instruction resource. + * + * @deprecated Use the {@link InstructionName} class instead. + */ + @Deprecated + public static final String formatInstructionName(String project, String instruction) { + return INSTRUCTION_PATH_TEMPLATE.instantiate( + "project", project, + "instruction", instruction); + } + + /** + * Parses the project from the given fully-qualified path which represents a project resource. + * + * @deprecated Use the {@link ProjectName} class instead. + */ + @Deprecated + public static final String parseProjectFromProjectName(String projectName) { + return PROJECT_PATH_TEMPLATE.parse(projectName).get("project"); + } + + /** + * Parses the project from the given fully-qualified path which represents a annotation_spec_set + * resource. + * + * @deprecated Use the {@link AnnotationSpecSetName} class instead. + */ + @Deprecated + public static final String parseProjectFromAnnotationSpecSetName(String annotationSpecSetName) { + return ANNOTATION_SPEC_SET_PATH_TEMPLATE.parse(annotationSpecSetName).get("project"); + } + + /** + * Parses the annotation_spec_set from the given fully-qualified path which represents a + * annotation_spec_set resource. + * + * @deprecated Use the {@link AnnotationSpecSetName} class instead. + */ + @Deprecated + public static final String parseAnnotationSpecSetFromAnnotationSpecSetName( + String annotationSpecSetName) { + return ANNOTATION_SPEC_SET_PATH_TEMPLATE + .parse(annotationSpecSetName) + .get("annotation_spec_set"); + } + + /** + * Parses the project from the given fully-qualified path which represents a dataset resource. + * + * @deprecated Use the {@link DatasetName} class instead. + */ + @Deprecated + public static final String parseProjectFromDatasetName(String datasetName) { + return DATASET_PATH_TEMPLATE.parse(datasetName).get("project"); + } + + /** + * Parses the dataset from the given fully-qualified path which represents a dataset resource. + * + * @deprecated Use the {@link DatasetName} class instead. + */ + @Deprecated + public static final String parseDatasetFromDatasetName(String datasetName) { + return DATASET_PATH_TEMPLATE.parse(datasetName).get("dataset"); + } + + /** + * Parses the project from the given fully-qualified path which represents a annotated_dataset + * resource. + * + * @deprecated Use the {@link AnnotatedDatasetName} class instead. + */ + @Deprecated + public static final String parseProjectFromAnnotatedDatasetName(String annotatedDatasetName) { + return ANNOTATED_DATASET_PATH_TEMPLATE.parse(annotatedDatasetName).get("project"); + } + + /** + * Parses the dataset from the given fully-qualified path which represents a annotated_dataset + * resource. + * + * @deprecated Use the {@link AnnotatedDatasetName} class instead. + */ + @Deprecated + public static final String parseDatasetFromAnnotatedDatasetName(String annotatedDatasetName) { + return ANNOTATED_DATASET_PATH_TEMPLATE.parse(annotatedDatasetName).get("dataset"); + } + + /** + * Parses the annotated_dataset from the given fully-qualified path which represents a + * annotated_dataset resource. + * + * @deprecated Use the {@link AnnotatedDatasetName} class instead. + */ + @Deprecated + public static final String parseAnnotatedDatasetFromAnnotatedDatasetName( + String annotatedDatasetName) { + return ANNOTATED_DATASET_PATH_TEMPLATE.parse(annotatedDatasetName).get("annotated_dataset"); + } + + /** + * Parses the project from the given fully-qualified path which represents a example resource. + * + * @deprecated Use the {@link ExampleName} class instead. + */ + @Deprecated + public static final String parseProjectFromExampleName(String exampleName) { + return EXAMPLE_PATH_TEMPLATE.parse(exampleName).get("project"); + } + + /** + * Parses the dataset from the given fully-qualified path which represents a example resource. + * + * @deprecated Use the {@link ExampleName} class instead. + */ + @Deprecated + public static final String parseDatasetFromExampleName(String exampleName) { + return EXAMPLE_PATH_TEMPLATE.parse(exampleName).get("dataset"); + } + + /** + * Parses the annotated_dataset from the given fully-qualified path which represents a example + * resource. + * + * @deprecated Use the {@link ExampleName} class instead. + */ + @Deprecated + public static final String parseAnnotatedDatasetFromExampleName(String exampleName) { + return EXAMPLE_PATH_TEMPLATE.parse(exampleName).get("annotated_dataset"); + } + + /** + * Parses the example from the given fully-qualified path which represents a example resource. + * + * @deprecated Use the {@link ExampleName} class instead. + */ + @Deprecated + public static final String parseExampleFromExampleName(String exampleName) { + return EXAMPLE_PATH_TEMPLATE.parse(exampleName).get("example"); + } + + /** + * Parses the project from the given fully-qualified path which represents a data_item resource. + * + * @deprecated Use the {@link DataItemName} class instead. + */ + @Deprecated + public static final String parseProjectFromDataItemName(String dataItemName) { + return DATA_ITEM_PATH_TEMPLATE.parse(dataItemName).get("project"); + } + + /** + * Parses the dataset from the given fully-qualified path which represents a data_item resource. + * + * @deprecated Use the {@link DataItemName} class instead. + */ + @Deprecated + public static final String parseDatasetFromDataItemName(String dataItemName) { + return DATA_ITEM_PATH_TEMPLATE.parse(dataItemName).get("dataset"); + } + + /** + * Parses the data_item from the given fully-qualified path which represents a data_item resource. + * + * @deprecated Use the {@link DataItemName} class instead. + */ + @Deprecated + public static final String parseDataItemFromDataItemName(String dataItemName) { + return DATA_ITEM_PATH_TEMPLATE.parse(dataItemName).get("data_item"); + } + + /** + * Parses the project from the given fully-qualified path which represents a instruction resource. + * + * @deprecated Use the {@link InstructionName} class instead. + */ + @Deprecated + public static final String parseProjectFromInstructionName(String instructionName) { + return INSTRUCTION_PATH_TEMPLATE.parse(instructionName).get("project"); + } + + /** + * Parses the instruction from the given fully-qualified path which represents a instruction + * resource. + * + * @deprecated Use the {@link InstructionName} class instead. + */ + @Deprecated + public static final String parseInstructionFromInstructionName(String instructionName) { + return INSTRUCTION_PATH_TEMPLATE.parse(instructionName).get("instruction"); + } + + /** Constructs an instance of DataLabelingServiceClient with default settings. */ + public static final DataLabelingServiceClient create() throws IOException { + return create(DataLabelingServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataLabelingServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final DataLabelingServiceClient create(DataLabelingServiceSettings settings) + throws IOException { + return new DataLabelingServiceClient(settings); + } + + /** + * Constructs an instance of DataLabelingServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer to use DataLabelingServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final DataLabelingServiceClient create(DataLabelingServiceStub stub) { + return new DataLabelingServiceClient(stub); + } + + /** + * Constructs an instance of DataLabelingServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected DataLabelingServiceClient(DataLabelingServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataLabelingServiceStubSettings) 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 DataLabelingServiceClient(DataLabelingServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final DataLabelingServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataLabelingServiceStub 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 + /** + * Creates dataset. If success return a Dataset resource. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   Dataset response = dataLabelingServiceClient.createDataset(formattedParent, dataset);
+   * }
+   * 
+ * + * @param parent Required. Dataset resource parent, format: projects/{project_id} + * @param dataset Required. The dataset to be created. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset createDataset(String parent, Dataset dataset) { + PROJECT_PATH_TEMPLATE.validate(parent, "createDataset"); + CreateDatasetRequest request = + CreateDatasetRequest.newBuilder().setParent(parent).setDataset(dataset).build(); + return createDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates dataset. If success return a Dataset resource. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   CreateDatasetRequest request = CreateDatasetRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setDataset(dataset)
+   *     .build();
+   *   Dataset response = dataLabelingServiceClient.createDataset(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 createDataset(CreateDatasetRequest request) { + return createDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates dataset. If success return a Dataset resource. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   CreateDatasetRequest request = CreateDatasetRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setDataset(dataset)
+   *     .build();
+   *   ApiFuture<Dataset> future = dataLabelingServiceClient.createDatasetCallable().futureCall(request);
+   *   // Do something
+   *   Dataset response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createDatasetCallable() { + return stub.createDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets dataset by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   Dataset response = dataLabelingServiceClient.getDataset(formattedName);
+   * }
+   * 
+ * + * @param name Required. Dataset resource name, format: + * projects/{project_id}/datasets/{dataset_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset getDataset(String name) { + DATASET_PATH_TEMPLATE.validate(name, "getDataset"); + GetDatasetRequest request = GetDatasetRequest.newBuilder().setName(name).build(); + return getDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets dataset by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   GetDatasetRequest request = GetDatasetRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   Dataset response = dataLabelingServiceClient.getDataset(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 getDataset(GetDatasetRequest request) { + return getDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets dataset by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   GetDatasetRequest request = GetDatasetRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<Dataset> future = dataLabelingServiceClient.getDatasetCallable().futureCall(request);
+   *   // Do something
+   *   Dataset response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getDatasetCallable() { + return stub.getDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists datasets under a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   String filter = "";
+   *   for (Dataset element : dataLabelingServiceClient.listDatasets(formattedParent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Dataset resource parent, format: projects/{project_id} + * @param filter Optional. Filter on dataset is not supported at this moment. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDatasetsPagedResponse listDatasets(String parent, String filter) { + PROJECT_PATH_TEMPLATE.validate(parent, "listDatasets"); + ListDatasetsRequest request = + ListDatasetsRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listDatasets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists datasets under a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   ListDatasetsRequest request = ListDatasetsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   for (Dataset element : dataLabelingServiceClient.listDatasets(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 ListDatasetsPagedResponse listDatasets(ListDatasetsRequest request) { + return listDatasetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists datasets under a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   ListDatasetsRequest request = ListDatasetsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   ApiFuture<ListDatasetsPagedResponse> future = dataLabelingServiceClient.listDatasetsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Dataset element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listDatasetsPagedCallable() { + return stub.listDatasetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists datasets under a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   ListDatasetsRequest request = ListDatasetsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   while (true) {
+   *     ListDatasetsResponse response = dataLabelingServiceClient.listDatasetsCallable().call(request);
+   *     for (Dataset element : response.getDatasetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listDatasetsCallable() { + return stub.listDatasetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a dataset by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   dataLabelingServiceClient.deleteDataset(formattedName);
+   * }
+   * 
+ * + * @param name Required. Dataset resource name, format: + * projects/{project_id}/datasets/{dataset_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDataset(String name) { + DATASET_PATH_TEMPLATE.validate(name, "deleteDataset"); + DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder().setName(name).build(); + deleteDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a dataset by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   dataLabelingServiceClient.deleteDataset(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 void deleteDataset(DeleteDatasetRequest request) { + deleteDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a dataset by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<Void> future = dataLabelingServiceClient.deleteDatasetCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteDatasetCallable() { + return stub.deleteDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports data into dataset based on source locations defined in request. It can be called + * multiple times for the same dataset. Each dataset can only have one long running operation + * running on it. For example, no labeling task (also long running operation) can be started while + * importing is still ongoing. Vice versa. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   InputConfig inputConfig = InputConfig.newBuilder().build();
+   *   ImportDataOperationResponse response = dataLabelingServiceClient.importDataAsync(formattedName, inputConfig).get();
+   * }
+   * 
+ * + * @param name Required. Dataset resource name, format: + * projects/{project_id}/datasets/{dataset_id} + * @param inputConfig Required. Specify the input source of the data. + * @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 + importDataAsync(String name, InputConfig inputConfig) { + DATASET_PATH_TEMPLATE.validate(name, "importData"); + ImportDataRequest request = + ImportDataRequest.newBuilder().setName(name).setInputConfig(inputConfig).build(); + return importDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports data into dataset based on source locations defined in request. It can be called + * multiple times for the same dataset. Each dataset can only have one long running operation + * running on it. For example, no labeling task (also long running operation) can be started while + * importing is still ongoing. Vice versa. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   InputConfig inputConfig = InputConfig.newBuilder().build();
+   *   ImportDataRequest request = ImportDataRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .setInputConfig(inputConfig)
+   *     .build();
+   *   ImportDataOperationResponse response = dataLabelingServiceClient.importDataAsync(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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + importDataAsync(ImportDataRequest request) { + return importDataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports data into dataset based on source locations defined in request. It can be called + * multiple times for the same dataset. Each dataset can only have one long running operation + * running on it. For example, no labeling task (also long running operation) can be started while + * importing is still ongoing. Vice versa. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   InputConfig inputConfig = InputConfig.newBuilder().build();
+   *   ImportDataRequest request = ImportDataRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .setInputConfig(inputConfig)
+   *     .build();
+   *   OperationFuture<ImportDataOperationResponse, ImportDataOperationMetadata> future = dataLabelingServiceClient.importDataOperationCallable().futureCall(request);
+   *   // Do something
+   *   ImportDataOperationResponse response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + ImportDataRequest, ImportDataOperationResponse, ImportDataOperationMetadata> + importDataOperationCallable() { + return stub.importDataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Imports data into dataset based on source locations defined in request. It can be called + * multiple times for the same dataset. Each dataset can only have one long running operation + * running on it. For example, no labeling task (also long running operation) can be started while + * importing is still ongoing. Vice versa. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   InputConfig inputConfig = InputConfig.newBuilder().build();
+   *   ImportDataRequest request = ImportDataRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .setInputConfig(inputConfig)
+   *     .build();
+   *   ApiFuture<Operation> future = dataLabelingServiceClient.importDataCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable importDataCallable() { + return stub.importDataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports data and annotations from dataset. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   String annotatedDataset = "";
+   *   String filter = "";
+   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
+   *   ExportDataOperationResponse response = dataLabelingServiceClient.exportDataAsync(formattedName, annotatedDataset, filter, outputConfig).get();
+   * }
+   * 
+ * + * @param name Required. Dataset resource name, format: + * projects/{project_id}/datasets/{dataset_id} + * @param annotatedDataset Required. Annotated dataset resource name. DataItem in Dataset and + * their annotations in specified annotated dataset will be exported. It's in format of + * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id} + * @param filter Optional. Filter is not supported at this moment. + * @param outputConfig Required. Specify the output destination. + * @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 + exportDataAsync( + String name, String annotatedDataset, String filter, OutputConfig outputConfig) { + DATASET_PATH_TEMPLATE.validate(name, "exportData"); + ExportDataRequest request = + ExportDataRequest.newBuilder() + .setName(name) + .setAnnotatedDataset(annotatedDataset) + .setFilter(filter) + .setOutputConfig(outputConfig) + .build(); + return exportDataAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports data and annotations from dataset. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   String annotatedDataset = "";
+   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
+   *   ExportDataRequest request = ExportDataRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .setAnnotatedDataset(annotatedDataset)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   ExportDataOperationResponse response = dataLabelingServiceClient.exportDataAsync(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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + exportDataAsync(ExportDataRequest request) { + return exportDataOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports data and annotations from dataset. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   String annotatedDataset = "";
+   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
+   *   ExportDataRequest request = ExportDataRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .setAnnotatedDataset(annotatedDataset)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   OperationFuture<ExportDataOperationResponse, ExportDataOperationMetadata> future = dataLabelingServiceClient.exportDataOperationCallable().futureCall(request);
+   *   // Do something
+   *   ExportDataOperationResponse response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata> + exportDataOperationCallable() { + return stub.exportDataOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports data and annotations from dataset. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   String annotatedDataset = "";
+   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
+   *   ExportDataRequest request = ExportDataRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .setAnnotatedDataset(annotatedDataset)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   ApiFuture<Operation> future = dataLabelingServiceClient.exportDataCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable exportDataCallable() { + return stub.exportDataCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a data item in a dataset by resource name. This API can be called after data are imported + * into dataset. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDataItemName("[PROJECT]", "[DATASET]", "[DATA_ITEM]");
+   *   DataItem response = dataLabelingServiceClient.getDataItem(formattedName);
+   * }
+   * 
+ * + * @param name Required. The name of the data item to get, format: + * projects/{project_id}/datasets/{dataset_id}/dataItems/{data_item_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataItem getDataItem(String name) { + DATA_ITEM_PATH_TEMPLATE.validate(name, "getDataItem"); + GetDataItemRequest request = GetDataItemRequest.newBuilder().setName(name).build(); + return getDataItem(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a data item in a dataset by resource name. This API can be called after data are imported + * into dataset. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDataItemName("[PROJECT]", "[DATASET]", "[DATA_ITEM]");
+   *   GetDataItemRequest request = GetDataItemRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   DataItem response = dataLabelingServiceClient.getDataItem(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 DataItem getDataItem(GetDataItemRequest request) { + return getDataItemCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a data item in a dataset by resource name. This API can be called after data are imported + * into dataset. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatDataItemName("[PROJECT]", "[DATASET]", "[DATA_ITEM]");
+   *   GetDataItemRequest request = GetDataItemRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<DataItem> future = dataLabelingServiceClient.getDataItemCallable().futureCall(request);
+   *   // Do something
+   *   DataItem response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getDataItemCallable() { + return stub.getDataItemCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists data items in a dataset. This API can be called after data are imported into dataset. + * Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   String filter = "";
+   *   for (DataItem element : dataLabelingServiceClient.listDataItems(formattedParent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Name of the dataset to list data items, format: + * projects/{project_id}/datasets/{dataset_id} + * @param filter Optional. Filter is not supported at this moment. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataItemsPagedResponse listDataItems(String parent, String filter) { + DATASET_PATH_TEMPLATE.validate(parent, "listDataItems"); + ListDataItemsRequest request = + ListDataItemsRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listDataItems(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists data items in a dataset. This API can be called after data are imported into dataset. + * Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   ListDataItemsRequest request = ListDataItemsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   for (DataItem element : dataLabelingServiceClient.listDataItems(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 ListDataItemsPagedResponse listDataItems(ListDataItemsRequest request) { + return listDataItemsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists data items in a dataset. This API can be called after data are imported into dataset. + * Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   ListDataItemsRequest request = ListDataItemsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   ApiFuture<ListDataItemsPagedResponse> future = dataLabelingServiceClient.listDataItemsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (DataItem element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listDataItemsPagedCallable() { + return stub.listDataItemsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists data items in a dataset. This API can be called after data are imported into dataset. + * Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   ListDataItemsRequest request = ListDataItemsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   while (true) {
+   *     ListDataItemsResponse response = dataLabelingServiceClient.listDataItemsCallable().call(request);
+   *     for (DataItem element : response.getDataItemsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listDataItemsCallable() { + return stub.listDataItemsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an annotated dataset by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatAnnotatedDatasetName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]");
+   *   AnnotatedDataset response = dataLabelingServiceClient.getAnnotatedDataset(formattedName);
+   * }
+   * 
+ * + * @param name Required. Name of the annotated dataset to get, format: + * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ {annotated_dataset_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnnotatedDataset getAnnotatedDataset(String name) { + ANNOTATED_DATASET_PATH_TEMPLATE.validate(name, "getAnnotatedDataset"); + GetAnnotatedDatasetRequest request = + GetAnnotatedDatasetRequest.newBuilder().setName(name).build(); + return getAnnotatedDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an annotated dataset by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatAnnotatedDatasetName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]");
+   *   GetAnnotatedDatasetRequest request = GetAnnotatedDatasetRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   AnnotatedDataset response = dataLabelingServiceClient.getAnnotatedDataset(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 AnnotatedDataset getAnnotatedDataset(GetAnnotatedDatasetRequest request) { + return getAnnotatedDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an annotated dataset by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatAnnotatedDatasetName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]");
+   *   GetAnnotatedDatasetRequest request = GetAnnotatedDatasetRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<AnnotatedDataset> future = dataLabelingServiceClient.getAnnotatedDatasetCallable().futureCall(request);
+   *   // Do something
+   *   AnnotatedDataset response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + getAnnotatedDatasetCallable() { + return stub.getAnnotatedDatasetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists annotated datasets for a dataset. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   String filter = "";
+   *   for (AnnotatedDataset element : dataLabelingServiceClient.listAnnotatedDatasets(formattedParent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Name of the dataset to list annotated datasets, format: + * projects/{project_id}/datasets/{dataset_id} + * @param filter Optional. Filter is not supported at this moment. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAnnotatedDatasetsPagedResponse listAnnotatedDatasets( + String parent, String filter) { + DATASET_PATH_TEMPLATE.validate(parent, "listAnnotatedDatasets"); + ListAnnotatedDatasetsRequest request = + ListAnnotatedDatasetsRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listAnnotatedDatasets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists annotated datasets for a dataset. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   ListAnnotatedDatasetsRequest request = ListAnnotatedDatasetsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   for (AnnotatedDataset element : dataLabelingServiceClient.listAnnotatedDatasets(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 ListAnnotatedDatasetsPagedResponse listAnnotatedDatasets( + ListAnnotatedDatasetsRequest request) { + return listAnnotatedDatasetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists annotated datasets for a dataset. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   ListAnnotatedDatasetsRequest request = ListAnnotatedDatasetsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   ApiFuture<ListAnnotatedDatasetsPagedResponse> future = dataLabelingServiceClient.listAnnotatedDatasetsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (AnnotatedDataset element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listAnnotatedDatasetsPagedCallable() { + return stub.listAnnotatedDatasetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists annotated datasets for a dataset. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   ListAnnotatedDatasetsRequest request = ListAnnotatedDatasetsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   while (true) {
+   *     ListAnnotatedDatasetsResponse response = dataLabelingServiceClient.listAnnotatedDatasetsCallable().call(request);
+   *     for (AnnotatedDataset element : response.getAnnotatedDatasetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listAnnotatedDatasetsCallable() { + return stub.listAnnotatedDatasetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for image. The type of image labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelImageRequest.Feature feature = LabelImageRequest.Feature.FEATURE_UNSPECIFIED;
+   *   AnnotatedDataset response = dataLabelingServiceClient.labelImageAsync(formattedParent, basicConfig, feature).get();
+   * }
+   * 
+ * + * @param parent Required. Name of the dataset to request labeling task, format: + * projects/{project_id}/datasets/{dataset_id} + * @param basicConfig Required. Basic human annotation config. + * @param feature Required. The type of image labeling task. + * @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 labelImageAsync( + String parent, HumanAnnotationConfig basicConfig, LabelImageRequest.Feature feature) { + DATASET_PATH_TEMPLATE.validate(parent, "labelImage"); + LabelImageRequest request = + LabelImageRequest.newBuilder() + .setParent(parent) + .setBasicConfig(basicConfig) + .setFeature(feature) + .build(); + return labelImageAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for image. The type of image labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelImageRequest.Feature feature = LabelImageRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelImageRequest request = LabelImageRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   AnnotatedDataset response = dataLabelingServiceClient.labelImageAsync(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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture labelImageAsync( + LabelImageRequest request) { + return labelImageOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for image. The type of image labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelImageRequest.Feature feature = LabelImageRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelImageRequest request = LabelImageRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   OperationFuture<AnnotatedDataset, LabelOperationMetadata> future = dataLabelingServiceClient.labelImageOperationCallable().futureCall(request);
+   *   // Do something
+   *   AnnotatedDataset response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + labelImageOperationCallable() { + return stub.labelImageOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for image. The type of image labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelImageRequest.Feature feature = LabelImageRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelImageRequest request = LabelImageRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   ApiFuture<Operation> future = dataLabelingServiceClient.labelImageCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable labelImageCallable() { + return stub.labelImageCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for video. The type of video labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelVideoRequest.Feature feature = LabelVideoRequest.Feature.FEATURE_UNSPECIFIED;
+   *   AnnotatedDataset response = dataLabelingServiceClient.labelVideoAsync(formattedParent, basicConfig, feature).get();
+   * }
+   * 
+ * + * @param parent Required. Name of the dataset to request labeling task, format: + * projects/{project_id}/datasets/{dataset_id} + * @param basicConfig Required. Basic human annotation config. + * @param feature Required. The type of video labeling task. + * @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 labelVideoAsync( + String parent, HumanAnnotationConfig basicConfig, LabelVideoRequest.Feature feature) { + DATASET_PATH_TEMPLATE.validate(parent, "labelVideo"); + LabelVideoRequest request = + LabelVideoRequest.newBuilder() + .setParent(parent) + .setBasicConfig(basicConfig) + .setFeature(feature) + .build(); + return labelVideoAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for video. The type of video labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelVideoRequest.Feature feature = LabelVideoRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelVideoRequest request = LabelVideoRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   AnnotatedDataset response = dataLabelingServiceClient.labelVideoAsync(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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture labelVideoAsync( + LabelVideoRequest request) { + return labelVideoOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for video. The type of video labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelVideoRequest.Feature feature = LabelVideoRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelVideoRequest request = LabelVideoRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   OperationFuture<AnnotatedDataset, LabelOperationMetadata> future = dataLabelingServiceClient.labelVideoOperationCallable().futureCall(request);
+   *   // Do something
+   *   AnnotatedDataset response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + labelVideoOperationCallable() { + return stub.labelVideoOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for video. The type of video labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelVideoRequest.Feature feature = LabelVideoRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelVideoRequest request = LabelVideoRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   ApiFuture<Operation> future = dataLabelingServiceClient.labelVideoCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable labelVideoCallable() { + return stub.labelVideoCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for text. The type of text labeling task is configured by feature in the + * request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelTextRequest.Feature feature = LabelTextRequest.Feature.FEATURE_UNSPECIFIED;
+   *   AnnotatedDataset response = dataLabelingServiceClient.labelTextAsync(formattedParent, basicConfig, feature).get();
+   * }
+   * 
+ * + * @param parent Required. Name of the data set to request labeling task, format: + * projects/{project_id}/datasets/{dataset_id} + * @param basicConfig Required. Basic human annotation config. + * @param feature Required. The type of text labeling task. + * @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 labelTextAsync( + String parent, HumanAnnotationConfig basicConfig, LabelTextRequest.Feature feature) { + DATASET_PATH_TEMPLATE.validate(parent, "labelText"); + LabelTextRequest request = + LabelTextRequest.newBuilder() + .setParent(parent) + .setBasicConfig(basicConfig) + .setFeature(feature) + .build(); + return labelTextAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for text. The type of text labeling task is configured by feature in the + * request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelTextRequest.Feature feature = LabelTextRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelTextRequest request = LabelTextRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   AnnotatedDataset response = dataLabelingServiceClient.labelTextAsync(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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture labelTextAsync( + LabelTextRequest request) { + return labelTextOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for text. The type of text labeling task is configured by feature in the + * request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelTextRequest.Feature feature = LabelTextRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelTextRequest request = LabelTextRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   OperationFuture<AnnotatedDataset, LabelOperationMetadata> future = dataLabelingServiceClient.labelTextOperationCallable().futureCall(request);
+   *   // Do something
+   *   AnnotatedDataset response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + labelTextOperationCallable() { + return stub.labelTextOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for text. The type of text labeling task is configured by feature in the + * request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelTextRequest.Feature feature = LabelTextRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelTextRequest request = LabelTextRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   ApiFuture<Operation> future = dataLabelingServiceClient.labelTextCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable labelTextCallable() { + return stub.labelTextCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for audio. The type of audio labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelAudioRequest.Feature feature = LabelAudioRequest.Feature.FEATURE_UNSPECIFIED;
+   *   AnnotatedDataset response = dataLabelingServiceClient.labelAudioAsync(formattedParent, basicConfig, feature).get();
+   * }
+   * 
+ * + * @param parent Required. Name of the dataset to request labeling task, format: + * projects/{project_id}/datasets/{dataset_id} + * @param basicConfig Required. Basic human annotation config. + * @param feature Required. The type of audio labeling task. + * @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 labelAudioAsync( + String parent, HumanAnnotationConfig basicConfig, LabelAudioRequest.Feature feature) { + DATASET_PATH_TEMPLATE.validate(parent, "labelAudio"); + LabelAudioRequest request = + LabelAudioRequest.newBuilder() + .setParent(parent) + .setBasicConfig(basicConfig) + .setFeature(feature) + .build(); + return labelAudioAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for audio. The type of audio labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelAudioRequest.Feature feature = LabelAudioRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelAudioRequest request = LabelAudioRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   AnnotatedDataset response = dataLabelingServiceClient.labelAudioAsync(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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture labelAudioAsync( + LabelAudioRequest request) { + return labelAudioOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for audio. The type of audio labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelAudioRequest.Feature feature = LabelAudioRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelAudioRequest request = LabelAudioRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   OperationFuture<AnnotatedDataset, LabelOperationMetadata> future = dataLabelingServiceClient.labelAudioOperationCallable().futureCall(request);
+   *   // Do something
+   *   AnnotatedDataset response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + labelAudioOperationCallable() { + return stub.labelAudioOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Starts a labeling task for audio. The type of audio labeling task is configured by feature in + * the request. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]");
+   *   HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build();
+   *   LabelAudioRequest.Feature feature = LabelAudioRequest.Feature.FEATURE_UNSPECIFIED;
+   *   LabelAudioRequest request = LabelAudioRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setBasicConfig(basicConfig)
+   *     .setFeature(feature)
+   *     .build();
+   *   ApiFuture<Operation> future = dataLabelingServiceClient.labelAudioCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable labelAudioCallable() { + return stub.labelAudioCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an example by resource name, including both data and annotation. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatExampleName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]", "[EXAMPLE]");
+   *   String filter = "";
+   *   Example response = dataLabelingServiceClient.getExample(formattedName, filter);
+   * }
+   * 
+ * + * @param name Required. Name of example, format: + * projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/ + * {annotated_dataset_id}/examples/{example_id} + * @param filter Optional. An expression for filtering Examples. Filter by + * annotation_spec.display_name is supported. Format "annotation_spec.display_name = + * {display_name}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Example getExample(String name, String filter) { + EXAMPLE_PATH_TEMPLATE.validate(name, "getExample"); + GetExampleRequest request = + GetExampleRequest.newBuilder().setName(name).setFilter(filter).build(); + return getExample(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an example by resource name, including both data and annotation. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatExampleName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]", "[EXAMPLE]");
+   *   GetExampleRequest request = GetExampleRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   Example response = dataLabelingServiceClient.getExample(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 Example getExample(GetExampleRequest request) { + return getExampleCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an example by resource name, including both data and annotation. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatExampleName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]", "[EXAMPLE]");
+   *   GetExampleRequest request = GetExampleRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<Example> future = dataLabelingServiceClient.getExampleCallable().futureCall(request);
+   *   // Do something
+   *   Example response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getExampleCallable() { + return stub.getExampleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists examples in an annotated dataset. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatAnnotatedDatasetName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]");
+   *   String filter = "";
+   *   for (Example element : dataLabelingServiceClient.listExamples(formattedParent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Example resource parent. + * @param filter Optional. An expression for filtering Examples. For annotated datasets that have + * annotation spec set, filter by annotation_spec.display_name is supported. Format + * "annotation_spec.display_name = {display_name}" + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListExamplesPagedResponse listExamples(String parent, String filter) { + ANNOTATED_DATASET_PATH_TEMPLATE.validate(parent, "listExamples"); + ListExamplesRequest request = + ListExamplesRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listExamples(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists examples in an annotated dataset. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatAnnotatedDatasetName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]");
+   *   ListExamplesRequest request = ListExamplesRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   for (Example element : dataLabelingServiceClient.listExamples(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 ListExamplesPagedResponse listExamples(ListExamplesRequest request) { + return listExamplesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists examples in an annotated dataset. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatAnnotatedDatasetName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]");
+   *   ListExamplesRequest request = ListExamplesRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   ApiFuture<ListExamplesPagedResponse> future = dataLabelingServiceClient.listExamplesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Example element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listExamplesPagedCallable() { + return stub.listExamplesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists examples in an annotated dataset. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatAnnotatedDatasetName("[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]");
+   *   ListExamplesRequest request = ListExamplesRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   while (true) {
+   *     ListExamplesResponse response = dataLabelingServiceClient.listExamplesCallable().call(request);
+   *     for (Example element : response.getExamplesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listExamplesCallable() { + return stub.listExamplesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an annotation spec set by providing a set of labels. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   AnnotationSpecSet annotationSpecSet = AnnotationSpecSet.newBuilder().build();
+   *   AnnotationSpecSet response = dataLabelingServiceClient.createAnnotationSpecSet(formattedParent, annotationSpecSet);
+   * }
+   * 
+ * + * @param parent Required. AnnotationSpecSet resource parent, format: projects/{project_id} + * @param annotationSpecSet Required. Annotation spec set to create. Annotation specs must be + * included. Only one annotation spec will be accepted for annotation specs with same + * display_name. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnnotationSpecSet createAnnotationSpecSet( + String parent, AnnotationSpecSet annotationSpecSet) { + PROJECT_PATH_TEMPLATE.validate(parent, "createAnnotationSpecSet"); + CreateAnnotationSpecSetRequest request = + CreateAnnotationSpecSetRequest.newBuilder() + .setParent(parent) + .setAnnotationSpecSet(annotationSpecSet) + .build(); + return createAnnotationSpecSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an annotation spec set by providing a set of labels. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   AnnotationSpecSet annotationSpecSet = AnnotationSpecSet.newBuilder().build();
+   *   CreateAnnotationSpecSetRequest request = CreateAnnotationSpecSetRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setAnnotationSpecSet(annotationSpecSet)
+   *     .build();
+   *   AnnotationSpecSet response = dataLabelingServiceClient.createAnnotationSpecSet(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 AnnotationSpecSet createAnnotationSpecSet(CreateAnnotationSpecSetRequest request) { + return createAnnotationSpecSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an annotation spec set by providing a set of labels. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   AnnotationSpecSet annotationSpecSet = AnnotationSpecSet.newBuilder().build();
+   *   CreateAnnotationSpecSetRequest request = CreateAnnotationSpecSetRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setAnnotationSpecSet(annotationSpecSet)
+   *     .build();
+   *   ApiFuture<AnnotationSpecSet> future = dataLabelingServiceClient.createAnnotationSpecSetCallable().futureCall(request);
+   *   // Do something
+   *   AnnotationSpecSet response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + createAnnotationSpecSetCallable() { + return stub.createAnnotationSpecSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an annotation spec set by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatAnnotationSpecSetName("[PROJECT]", "[ANNOTATION_SPEC_SET]");
+   *   AnnotationSpecSet response = dataLabelingServiceClient.getAnnotationSpecSet(formattedName);
+   * }
+   * 
+ * + * @param name Required. AnnotationSpecSet resource name, format: + * projects/{project_id}/annotationSpecSets/{annotation_spec_set_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnnotationSpecSet getAnnotationSpecSet(String name) { + ANNOTATION_SPEC_SET_PATH_TEMPLATE.validate(name, "getAnnotationSpecSet"); + GetAnnotationSpecSetRequest request = + GetAnnotationSpecSetRequest.newBuilder().setName(name).build(); + return getAnnotationSpecSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an annotation spec set by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatAnnotationSpecSetName("[PROJECT]", "[ANNOTATION_SPEC_SET]");
+   *   GetAnnotationSpecSetRequest request = GetAnnotationSpecSetRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   AnnotationSpecSet response = dataLabelingServiceClient.getAnnotationSpecSet(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 AnnotationSpecSet getAnnotationSpecSet(GetAnnotationSpecSetRequest request) { + return getAnnotationSpecSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an annotation spec set by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatAnnotationSpecSetName("[PROJECT]", "[ANNOTATION_SPEC_SET]");
+   *   GetAnnotationSpecSetRequest request = GetAnnotationSpecSetRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<AnnotationSpecSet> future = dataLabelingServiceClient.getAnnotationSpecSetCallable().futureCall(request);
+   *   // Do something
+   *   AnnotationSpecSet response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + getAnnotationSpecSetCallable() { + return stub.getAnnotationSpecSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists annotation spec sets for a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   String filter = "";
+   *   for (AnnotationSpecSet element : dataLabelingServiceClient.listAnnotationSpecSets(formattedParent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Parent of AnnotationSpecSet resource, format: projects/{project_id} + * @param filter Optional. Filter is not supported at this moment. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAnnotationSpecSetsPagedResponse listAnnotationSpecSets( + String parent, String filter) { + PROJECT_PATH_TEMPLATE.validate(parent, "listAnnotationSpecSets"); + ListAnnotationSpecSetsRequest request = + ListAnnotationSpecSetsRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listAnnotationSpecSets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists annotation spec sets for a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   ListAnnotationSpecSetsRequest request = ListAnnotationSpecSetsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   for (AnnotationSpecSet element : dataLabelingServiceClient.listAnnotationSpecSets(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 ListAnnotationSpecSetsPagedResponse listAnnotationSpecSets( + ListAnnotationSpecSetsRequest request) { + return listAnnotationSpecSetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists annotation spec sets for a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   ListAnnotationSpecSetsRequest request = ListAnnotationSpecSetsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   ApiFuture<ListAnnotationSpecSetsPagedResponse> future = dataLabelingServiceClient.listAnnotationSpecSetsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (AnnotationSpecSet element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listAnnotationSpecSetsPagedCallable() { + return stub.listAnnotationSpecSetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists annotation spec sets for a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   ListAnnotationSpecSetsRequest request = ListAnnotationSpecSetsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   while (true) {
+   *     ListAnnotationSpecSetsResponse response = dataLabelingServiceClient.listAnnotationSpecSetsCallable().call(request);
+   *     for (AnnotationSpecSet element : response.getAnnotationSpecSetsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listAnnotationSpecSetsCallable() { + return stub.listAnnotationSpecSetsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an annotation spec set by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatAnnotationSpecSetName("[PROJECT]", "[ANNOTATION_SPEC_SET]");
+   *   dataLabelingServiceClient.deleteAnnotationSpecSet(formattedName);
+   * }
+   * 
+ * + * @param name Required. AnnotationSpec resource name, format: + * `projects/{project_id}/annotationSpecSets/{annotation_spec_set_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAnnotationSpecSet(String name) { + ANNOTATION_SPEC_SET_PATH_TEMPLATE.validate(name, "deleteAnnotationSpecSet"); + DeleteAnnotationSpecSetRequest request = + DeleteAnnotationSpecSetRequest.newBuilder().setName(name).build(); + deleteAnnotationSpecSet(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an annotation spec set by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatAnnotationSpecSetName("[PROJECT]", "[ANNOTATION_SPEC_SET]");
+   *   DeleteAnnotationSpecSetRequest request = DeleteAnnotationSpecSetRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   dataLabelingServiceClient.deleteAnnotationSpecSet(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 void deleteAnnotationSpecSet(DeleteAnnotationSpecSetRequest request) { + deleteAnnotationSpecSetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an annotation spec set by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatAnnotationSpecSetName("[PROJECT]", "[ANNOTATION_SPEC_SET]");
+   *   DeleteAnnotationSpecSetRequest request = DeleteAnnotationSpecSetRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<Void> future = dataLabelingServiceClient.deleteAnnotationSpecSetCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + deleteAnnotationSpecSetCallable() { + return stub.deleteAnnotationSpecSetCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an instruction for how data should be labeled. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   Instruction instruction = Instruction.newBuilder().build();
+   *   Instruction response = dataLabelingServiceClient.createInstructionAsync(formattedParent, instruction).get();
+   * }
+   * 
+ * + * @param parent Required. Instruction resource parent, format: projects/{project_id} + * @param instruction Required. Instruction of how to perform the labeling task. + * @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 createInstructionAsync( + String parent, Instruction instruction) { + PROJECT_PATH_TEMPLATE.validate(parent, "createInstruction"); + CreateInstructionRequest request = + CreateInstructionRequest.newBuilder().setParent(parent).setInstruction(instruction).build(); + return createInstructionAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an instruction for how data should be labeled. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   Instruction instruction = Instruction.newBuilder().build();
+   *   CreateInstructionRequest request = CreateInstructionRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setInstruction(instruction)
+   *     .build();
+   *   Instruction response = dataLabelingServiceClient.createInstructionAsync(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 + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture createInstructionAsync( + CreateInstructionRequest request) { + return createInstructionOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an instruction for how data should be labeled. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   Instruction instruction = Instruction.newBuilder().build();
+   *   CreateInstructionRequest request = CreateInstructionRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setInstruction(instruction)
+   *     .build();
+   *   OperationFuture<Instruction, CreateInstructionMetadata> future = dataLabelingServiceClient.createInstructionOperationCallable().futureCall(request);
+   *   // Do something
+   *   Instruction response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + createInstructionOperationCallable() { + return stub.createInstructionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates an instruction for how data should be labeled. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   Instruction instruction = Instruction.newBuilder().build();
+   *   CreateInstructionRequest request = CreateInstructionRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .setInstruction(instruction)
+   *     .build();
+   *   ApiFuture<Operation> future = dataLabelingServiceClient.createInstructionCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createInstructionCallable() { + return stub.createInstructionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an instruction by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]");
+   *   Instruction response = dataLabelingServiceClient.getInstruction(formattedName);
+   * }
+   * 
+ * + * @param name Required. Instruction resource name, format: + * projects/{project_id}/instructions/{instruction_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Instruction getInstruction(String name) { + INSTRUCTION_PATH_TEMPLATE.validate(name, "getInstruction"); + GetInstructionRequest request = GetInstructionRequest.newBuilder().setName(name).build(); + return getInstruction(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an instruction by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]");
+   *   GetInstructionRequest request = GetInstructionRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   Instruction response = dataLabelingServiceClient.getInstruction(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 Instruction getInstruction(GetInstructionRequest request) { + return getInstructionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets an instruction by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]");
+   *   GetInstructionRequest request = GetInstructionRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<Instruction> future = dataLabelingServiceClient.getInstructionCallable().futureCall(request);
+   *   // Do something
+   *   Instruction response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getInstructionCallable() { + return stub.getInstructionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists instructions for a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   String filter = "";
+   *   for (Instruction element : dataLabelingServiceClient.listInstructions(formattedParent, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Instruction resource parent, format: projects/{project_id} + * @param filter Optional. Filter is not supported at this moment. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListInstructionsPagedResponse listInstructions(String parent, String filter) { + PROJECT_PATH_TEMPLATE.validate(parent, "listInstructions"); + ListInstructionsRequest request = + ListInstructionsRequest.newBuilder().setParent(parent).setFilter(filter).build(); + return listInstructions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists instructions for a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   ListInstructionsRequest request = ListInstructionsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   for (Instruction element : dataLabelingServiceClient.listInstructions(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 ListInstructionsPagedResponse listInstructions(ListInstructionsRequest request) { + return listInstructionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists instructions for a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   ListInstructionsRequest request = ListInstructionsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   ApiFuture<ListInstructionsPagedResponse> future = dataLabelingServiceClient.listInstructionsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Instruction element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listInstructionsPagedCallable() { + return stub.listInstructionsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists instructions for a project. Pagination is supported. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+   *   ListInstructionsRequest request = ListInstructionsRequest.newBuilder()
+   *     .setParent(formattedParent)
+   *     .build();
+   *   while (true) {
+   *     ListInstructionsResponse response = dataLabelingServiceClient.listInstructionsCallable().call(request);
+   *     for (Instruction element : response.getInstructionsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listInstructionsCallable() { + return stub.listInstructionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an instruction object by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]");
+   *   dataLabelingServiceClient.deleteInstruction(formattedName);
+   * }
+   * 
+ * + * @param name Required. Instruction resource name, format: + * projects/{project_id}/instructions/{instruction_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteInstruction(String name) { + INSTRUCTION_PATH_TEMPLATE.validate(name, "deleteInstruction"); + DeleteInstructionRequest request = DeleteInstructionRequest.newBuilder().setName(name).build(); + deleteInstruction(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an instruction object by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]");
+   *   DeleteInstructionRequest request = DeleteInstructionRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   dataLabelingServiceClient.deleteInstruction(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 void deleteInstruction(DeleteInstructionRequest request) { + deleteInstructionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an instruction object by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   String formattedName = DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]");
+   *   DeleteInstructionRequest request = DeleteInstructionRequest.newBuilder()
+   *     .setName(formattedName)
+   *     .build();
+   *   ApiFuture<Void> future = dataLabelingServiceClient.deleteInstructionCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteInstructionCallable() { + return stub.deleteInstructionCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an annotated dataset by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   DeleteAnnotatedDatasetRequest request = DeleteAnnotatedDatasetRequest.newBuilder().build();
+   *   dataLabelingServiceClient.deleteAnnotatedDataset(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 void deleteAnnotatedDataset(DeleteAnnotatedDatasetRequest request) { + deleteAnnotatedDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes an annotated dataset by resource name. + * + *

Sample code: + * + *


+   * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+   *   DeleteAnnotatedDatasetRequest request = DeleteAnnotatedDatasetRequest.newBuilder().build();
+   *   ApiFuture<Void> future = dataLabelingServiceClient.deleteAnnotatedDatasetCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + deleteAnnotatedDatasetCallable() { + return stub.deleteAnnotatedDatasetCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListDatasetsPagedResponse + extends AbstractPagedListResponse< + ListDatasetsRequest, + ListDatasetsResponse, + Dataset, + ListDatasetsPage, + ListDatasetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDatasetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListDatasetsPagedResponse apply(ListDatasetsPage input) { + return new ListDatasetsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListDatasetsPagedResponse(ListDatasetsPage page) { + super(page, ListDatasetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDatasetsPage + extends AbstractPage { + + private ListDatasetsPage( + PageContext context, + ListDatasetsResponse response) { + super(context, response); + } + + private static ListDatasetsPage createEmptyPage() { + return new ListDatasetsPage(null, null); + } + + @Override + protected ListDatasetsPage createPage( + PageContext context, + ListDatasetsResponse response) { + return new ListDatasetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDatasetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDatasetsRequest, + ListDatasetsResponse, + Dataset, + ListDatasetsPage, + ListDatasetsFixedSizeCollection> { + + private ListDatasetsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDatasetsFixedSizeCollection createEmptyCollection() { + return new ListDatasetsFixedSizeCollection(null, 0); + } + + @Override + protected ListDatasetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDatasetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDataItemsPagedResponse + extends AbstractPagedListResponse< + ListDataItemsRequest, + ListDataItemsResponse, + DataItem, + ListDataItemsPage, + ListDataItemsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataItemsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListDataItemsPagedResponse apply(ListDataItemsPage input) { + return new ListDataItemsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListDataItemsPagedResponse(ListDataItemsPage page) { + super(page, ListDataItemsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataItemsPage + extends AbstractPage< + ListDataItemsRequest, ListDataItemsResponse, DataItem, ListDataItemsPage> { + + private ListDataItemsPage( + PageContext context, + ListDataItemsResponse response) { + super(context, response); + } + + private static ListDataItemsPage createEmptyPage() { + return new ListDataItemsPage(null, null); + } + + @Override + protected ListDataItemsPage createPage( + PageContext context, + ListDataItemsResponse response) { + return new ListDataItemsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataItemsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataItemsRequest, + ListDataItemsResponse, + DataItem, + ListDataItemsPage, + ListDataItemsFixedSizeCollection> { + + private ListDataItemsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataItemsFixedSizeCollection createEmptyCollection() { + return new ListDataItemsFixedSizeCollection(null, 0); + } + + @Override + protected ListDataItemsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDataItemsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAnnotatedDatasetsPagedResponse + extends AbstractPagedListResponse< + ListAnnotatedDatasetsRequest, + ListAnnotatedDatasetsResponse, + AnnotatedDataset, + ListAnnotatedDatasetsPage, + ListAnnotatedDatasetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAnnotatedDatasetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListAnnotatedDatasetsPagedResponse apply(ListAnnotatedDatasetsPage input) { + return new ListAnnotatedDatasetsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListAnnotatedDatasetsPagedResponse(ListAnnotatedDatasetsPage page) { + super(page, ListAnnotatedDatasetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAnnotatedDatasetsPage + extends AbstractPage< + ListAnnotatedDatasetsRequest, + ListAnnotatedDatasetsResponse, + AnnotatedDataset, + ListAnnotatedDatasetsPage> { + + private ListAnnotatedDatasetsPage( + PageContext + context, + ListAnnotatedDatasetsResponse response) { + super(context, response); + } + + private static ListAnnotatedDatasetsPage createEmptyPage() { + return new ListAnnotatedDatasetsPage(null, null); + } + + @Override + protected ListAnnotatedDatasetsPage createPage( + PageContext + context, + ListAnnotatedDatasetsResponse response) { + return new ListAnnotatedDatasetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAnnotatedDatasetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAnnotatedDatasetsRequest, + ListAnnotatedDatasetsResponse, + AnnotatedDataset, + ListAnnotatedDatasetsPage, + ListAnnotatedDatasetsFixedSizeCollection> { + + private ListAnnotatedDatasetsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAnnotatedDatasetsFixedSizeCollection createEmptyCollection() { + return new ListAnnotatedDatasetsFixedSizeCollection(null, 0); + } + + @Override + protected ListAnnotatedDatasetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAnnotatedDatasetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListExamplesPagedResponse + extends AbstractPagedListResponse< + ListExamplesRequest, + ListExamplesResponse, + Example, + ListExamplesPage, + ListExamplesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListExamplesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListExamplesPagedResponse apply(ListExamplesPage input) { + return new ListExamplesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListExamplesPagedResponse(ListExamplesPage page) { + super(page, ListExamplesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListExamplesPage + extends AbstractPage { + + private ListExamplesPage( + PageContext context, + ListExamplesResponse response) { + super(context, response); + } + + private static ListExamplesPage createEmptyPage() { + return new ListExamplesPage(null, null); + } + + @Override + protected ListExamplesPage createPage( + PageContext context, + ListExamplesResponse response) { + return new ListExamplesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListExamplesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListExamplesRequest, + ListExamplesResponse, + Example, + ListExamplesPage, + ListExamplesFixedSizeCollection> { + + private ListExamplesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListExamplesFixedSizeCollection createEmptyCollection() { + return new ListExamplesFixedSizeCollection(null, 0); + } + + @Override + protected ListExamplesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListExamplesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListAnnotationSpecSetsPagedResponse + extends AbstractPagedListResponse< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + AnnotationSpecSet, + ListAnnotationSpecSetsPage, + ListAnnotationSpecSetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListAnnotationSpecSetsRequest, ListAnnotationSpecSetsResponse, AnnotationSpecSet> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAnnotationSpecSetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListAnnotationSpecSetsPagedResponse apply(ListAnnotationSpecSetsPage input) { + return new ListAnnotationSpecSetsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListAnnotationSpecSetsPagedResponse(ListAnnotationSpecSetsPage page) { + super(page, ListAnnotationSpecSetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAnnotationSpecSetsPage + extends AbstractPage< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + AnnotationSpecSet, + ListAnnotationSpecSetsPage> { + + private ListAnnotationSpecSetsPage( + PageContext< + ListAnnotationSpecSetsRequest, ListAnnotationSpecSetsResponse, AnnotationSpecSet> + context, + ListAnnotationSpecSetsResponse response) { + super(context, response); + } + + private static ListAnnotationSpecSetsPage createEmptyPage() { + return new ListAnnotationSpecSetsPage(null, null); + } + + @Override + protected ListAnnotationSpecSetsPage createPage( + PageContext< + ListAnnotationSpecSetsRequest, ListAnnotationSpecSetsResponse, AnnotationSpecSet> + context, + ListAnnotationSpecSetsResponse response) { + return new ListAnnotationSpecSetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListAnnotationSpecSetsRequest, ListAnnotationSpecSetsResponse, AnnotationSpecSet> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAnnotationSpecSetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + AnnotationSpecSet, + ListAnnotationSpecSetsPage, + ListAnnotationSpecSetsFixedSizeCollection> { + + private ListAnnotationSpecSetsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAnnotationSpecSetsFixedSizeCollection createEmptyCollection() { + return new ListAnnotationSpecSetsFixedSizeCollection(null, 0); + } + + @Override + protected ListAnnotationSpecSetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAnnotationSpecSetsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListInstructionsPagedResponse + extends AbstractPagedListResponse< + ListInstructionsRequest, + ListInstructionsResponse, + Instruction, + ListInstructionsPage, + ListInstructionsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListInstructionsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListInstructionsPagedResponse apply(ListInstructionsPage input) { + return new ListInstructionsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListInstructionsPagedResponse(ListInstructionsPage page) { + super(page, ListInstructionsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListInstructionsPage + extends AbstractPage< + ListInstructionsRequest, ListInstructionsResponse, Instruction, ListInstructionsPage> { + + private ListInstructionsPage( + PageContext context, + ListInstructionsResponse response) { + super(context, response); + } + + private static ListInstructionsPage createEmptyPage() { + return new ListInstructionsPage(null, null); + } + + @Override + protected ListInstructionsPage createPage( + PageContext context, + ListInstructionsResponse response) { + return new ListInstructionsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListInstructionsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListInstructionsRequest, + ListInstructionsResponse, + Instruction, + ListInstructionsPage, + ListInstructionsFixedSizeCollection> { + + private ListInstructionsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListInstructionsFixedSizeCollection createEmptyCollection() { + return new ListInstructionsFixedSizeCollection(null, 0); + } + + @Override + protected ListInstructionsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListInstructionsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceSettings.java b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceSettings.java new file mode 100644 index 000000000000..74fb78c13f08 --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceSettings.java @@ -0,0 +1,585 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.datalabeling.v1beta1; + +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotatedDatasetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotationSpecSetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListDataItemsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListDatasetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListExamplesPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListInstructionsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.datalabeling.v1beta1.stub.DataLabelingServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link DataLabelingServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (datalabeling.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of createDataset to 30 seconds: + * + *

+ * 
+ * DataLabelingServiceSettings.Builder dataLabelingServiceSettingsBuilder =
+ *     DataLabelingServiceSettings.newBuilder();
+ * dataLabelingServiceSettingsBuilder.createDatasetSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * DataLabelingServiceSettings dataLabelingServiceSettings = dataLabelingServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataLabelingServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to createDataset. */ + public UnaryCallSettings createDatasetSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).createDatasetSettings(); + } + + /** Returns the object with the settings used for calls to getDataset. */ + public UnaryCallSettings getDatasetSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).getDatasetSettings(); + } + + /** Returns the object with the settings used for calls to listDatasets. */ + public PagedCallSettings + listDatasetsSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).listDatasetsSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataset. */ + public UnaryCallSettings deleteDatasetSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).deleteDatasetSettings(); + } + + /** Returns the object with the settings used for calls to importData. */ + public UnaryCallSettings importDataSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).importDataSettings(); + } + + /** Returns the object with the settings used for calls to importData. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + ImportDataRequest, ImportDataOperationResponse, ImportDataOperationMetadata> + importDataOperationSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).importDataOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportData. */ + public UnaryCallSettings exportDataSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).exportDataSettings(); + } + + /** Returns the object with the settings used for calls to exportData. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata> + exportDataOperationSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).exportDataOperationSettings(); + } + + /** Returns the object with the settings used for calls to getDataItem. */ + public UnaryCallSettings getDataItemSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).getDataItemSettings(); + } + + /** Returns the object with the settings used for calls to listDataItems. */ + public PagedCallSettings + listDataItemsSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).listDataItemsSettings(); + } + + /** Returns the object with the settings used for calls to getAnnotatedDataset. */ + public UnaryCallSettings + getAnnotatedDatasetSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).getAnnotatedDatasetSettings(); + } + + /** Returns the object with the settings used for calls to listAnnotatedDatasets. */ + public PagedCallSettings< + ListAnnotatedDatasetsRequest, + ListAnnotatedDatasetsResponse, + ListAnnotatedDatasetsPagedResponse> + listAnnotatedDatasetsSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).listAnnotatedDatasetsSettings(); + } + + /** Returns the object with the settings used for calls to labelImage. */ + public UnaryCallSettings labelImageSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).labelImageSettings(); + } + + /** Returns the object with the settings used for calls to labelImage. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + labelImageOperationSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).labelImageOperationSettings(); + } + + /** Returns the object with the settings used for calls to labelVideo. */ + public UnaryCallSettings labelVideoSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).labelVideoSettings(); + } + + /** Returns the object with the settings used for calls to labelVideo. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + labelVideoOperationSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).labelVideoOperationSettings(); + } + + /** Returns the object with the settings used for calls to labelText. */ + public UnaryCallSettings labelTextSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).labelTextSettings(); + } + + /** Returns the object with the settings used for calls to labelText. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + labelTextOperationSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).labelTextOperationSettings(); + } + + /** Returns the object with the settings used for calls to labelAudio. */ + public UnaryCallSettings labelAudioSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).labelAudioSettings(); + } + + /** Returns the object with the settings used for calls to labelAudio. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + labelAudioOperationSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).labelAudioOperationSettings(); + } + + /** Returns the object with the settings used for calls to getExample. */ + public UnaryCallSettings getExampleSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).getExampleSettings(); + } + + /** Returns the object with the settings used for calls to listExamples. */ + public PagedCallSettings + listExamplesSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).listExamplesSettings(); + } + + /** Returns the object with the settings used for calls to createAnnotationSpecSet. */ + public UnaryCallSettings + createAnnotationSpecSetSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).createAnnotationSpecSetSettings(); + } + + /** Returns the object with the settings used for calls to getAnnotationSpecSet. */ + public UnaryCallSettings + getAnnotationSpecSetSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).getAnnotationSpecSetSettings(); + } + + /** Returns the object with the settings used for calls to listAnnotationSpecSets. */ + public PagedCallSettings< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + ListAnnotationSpecSetsPagedResponse> + listAnnotationSpecSetsSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).listAnnotationSpecSetsSettings(); + } + + /** Returns the object with the settings used for calls to deleteAnnotationSpecSet. */ + public UnaryCallSettings + deleteAnnotationSpecSetSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).deleteAnnotationSpecSetSettings(); + } + + /** Returns the object with the settings used for calls to createInstruction. */ + public UnaryCallSettings createInstructionSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).createInstructionSettings(); + } + + /** Returns the object with the settings used for calls to createInstruction. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + createInstructionOperationSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()) + .createInstructionOperationSettings(); + } + + /** Returns the object with the settings used for calls to getInstruction. */ + public UnaryCallSettings getInstructionSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).getInstructionSettings(); + } + + /** Returns the object with the settings used for calls to listInstructions. */ + public PagedCallSettings< + ListInstructionsRequest, ListInstructionsResponse, ListInstructionsPagedResponse> + listInstructionsSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).listInstructionsSettings(); + } + + /** Returns the object with the settings used for calls to deleteInstruction. */ + public UnaryCallSettings deleteInstructionSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).deleteInstructionSettings(); + } + + /** Returns the object with the settings used for calls to deleteAnnotatedDataset. */ + public UnaryCallSettings deleteAnnotatedDatasetSettings() { + return ((DataLabelingServiceStubSettings) getStubSettings()).deleteAnnotatedDatasetSettings(); + } + + public static final DataLabelingServiceSettings create(DataLabelingServiceStubSettings stub) + throws IOException { + return new DataLabelingServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataLabelingServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataLabelingServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataLabelingServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataLabelingServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataLabelingServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataLabelingServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataLabelingServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataLabelingServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataLabelingServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(DataLabelingServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(DataLabelingServiceStubSettings.newBuilder()); + } + + protected Builder(DataLabelingServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataLabelingServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public DataLabelingServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DataLabelingServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to createDataset. */ + public UnaryCallSettings.Builder createDatasetSettings() { + return getStubSettingsBuilder().createDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to getDataset. */ + public UnaryCallSettings.Builder getDatasetSettings() { + return getStubSettingsBuilder().getDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to listDatasets. */ + public PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings() { + return getStubSettingsBuilder().listDatasetsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataset. */ + public UnaryCallSettings.Builder deleteDatasetSettings() { + return getStubSettingsBuilder().deleteDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to importData. */ + public UnaryCallSettings.Builder importDataSettings() { + return getStubSettingsBuilder().importDataSettings(); + } + + /** Returns the builder for the settings used for calls to importData. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportDataRequest, ImportDataOperationResponse, ImportDataOperationMetadata> + importDataOperationSettings() { + return getStubSettingsBuilder().importDataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportData. */ + public UnaryCallSettings.Builder exportDataSettings() { + return getStubSettingsBuilder().exportDataSettings(); + } + + /** Returns the builder for the settings used for calls to exportData. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata> + exportDataOperationSettings() { + return getStubSettingsBuilder().exportDataOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getDataItem. */ + public UnaryCallSettings.Builder getDataItemSettings() { + return getStubSettingsBuilder().getDataItemSettings(); + } + + /** Returns the builder for the settings used for calls to listDataItems. */ + public PagedCallSettings.Builder< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse> + listDataItemsSettings() { + return getStubSettingsBuilder().listDataItemsSettings(); + } + + /** Returns the builder for the settings used for calls to getAnnotatedDataset. */ + public UnaryCallSettings.Builder + getAnnotatedDatasetSettings() { + return getStubSettingsBuilder().getAnnotatedDatasetSettings(); + } + + /** Returns the builder for the settings used for calls to listAnnotatedDatasets. */ + public PagedCallSettings.Builder< + ListAnnotatedDatasetsRequest, + ListAnnotatedDatasetsResponse, + ListAnnotatedDatasetsPagedResponse> + listAnnotatedDatasetsSettings() { + return getStubSettingsBuilder().listAnnotatedDatasetsSettings(); + } + + /** Returns the builder for the settings used for calls to labelImage. */ + public UnaryCallSettings.Builder labelImageSettings() { + return getStubSettingsBuilder().labelImageSettings(); + } + + /** Returns the builder for the settings used for calls to labelImage. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + LabelImageRequest, AnnotatedDataset, LabelOperationMetadata> + labelImageOperationSettings() { + return getStubSettingsBuilder().labelImageOperationSettings(); + } + + /** Returns the builder for the settings used for calls to labelVideo. */ + public UnaryCallSettings.Builder labelVideoSettings() { + return getStubSettingsBuilder().labelVideoSettings(); + } + + /** Returns the builder for the settings used for calls to labelVideo. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + LabelVideoRequest, AnnotatedDataset, LabelOperationMetadata> + labelVideoOperationSettings() { + return getStubSettingsBuilder().labelVideoOperationSettings(); + } + + /** Returns the builder for the settings used for calls to labelText. */ + public UnaryCallSettings.Builder labelTextSettings() { + return getStubSettingsBuilder().labelTextSettings(); + } + + /** Returns the builder for the settings used for calls to labelText. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + labelTextOperationSettings() { + return getStubSettingsBuilder().labelTextOperationSettings(); + } + + /** Returns the builder for the settings used for calls to labelAudio. */ + public UnaryCallSettings.Builder labelAudioSettings() { + return getStubSettingsBuilder().labelAudioSettings(); + } + + /** Returns the builder for the settings used for calls to labelAudio. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + LabelAudioRequest, AnnotatedDataset, LabelOperationMetadata> + labelAudioOperationSettings() { + return getStubSettingsBuilder().labelAudioOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getExample. */ + public UnaryCallSettings.Builder getExampleSettings() { + return getStubSettingsBuilder().getExampleSettings(); + } + + /** Returns the builder for the settings used for calls to listExamples. */ + public PagedCallSettings.Builder< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings() { + return getStubSettingsBuilder().listExamplesSettings(); + } + + /** Returns the builder for the settings used for calls to createAnnotationSpecSet. */ + public UnaryCallSettings.Builder + createAnnotationSpecSetSettings() { + return getStubSettingsBuilder().createAnnotationSpecSetSettings(); + } + + /** Returns the builder for the settings used for calls to getAnnotationSpecSet. */ + public UnaryCallSettings.Builder + getAnnotationSpecSetSettings() { + return getStubSettingsBuilder().getAnnotationSpecSetSettings(); + } + + /** Returns the builder for the settings used for calls to listAnnotationSpecSets. */ + public PagedCallSettings.Builder< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + ListAnnotationSpecSetsPagedResponse> + listAnnotationSpecSetsSettings() { + return getStubSettingsBuilder().listAnnotationSpecSetsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAnnotationSpecSet. */ + public UnaryCallSettings.Builder + deleteAnnotationSpecSetSettings() { + return getStubSettingsBuilder().deleteAnnotationSpecSetSettings(); + } + + /** Returns the builder for the settings used for calls to createInstruction. */ + public UnaryCallSettings.Builder + createInstructionSettings() { + return getStubSettingsBuilder().createInstructionSettings(); + } + + /** Returns the builder for the settings used for calls to createInstruction. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateInstructionRequest, Instruction, CreateInstructionMetadata> + createInstructionOperationSettings() { + return getStubSettingsBuilder().createInstructionOperationSettings(); + } + + /** Returns the builder for the settings used for calls to getInstruction. */ + public UnaryCallSettings.Builder getInstructionSettings() { + return getStubSettingsBuilder().getInstructionSettings(); + } + + /** Returns the builder for the settings used for calls to listInstructions. */ + public PagedCallSettings.Builder< + ListInstructionsRequest, ListInstructionsResponse, ListInstructionsPagedResponse> + listInstructionsSettings() { + return getStubSettingsBuilder().listInstructionsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteInstruction. */ + public UnaryCallSettings.Builder deleteInstructionSettings() { + return getStubSettingsBuilder().deleteInstructionSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAnnotatedDataset. */ + public UnaryCallSettings.Builder + deleteAnnotatedDatasetSettings() { + return getStubSettingsBuilder().deleteAnnotatedDatasetSettings(); + } + + @Override + public DataLabelingServiceSettings build() throws IOException { + return new DataLabelingServiceSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/package-info.java b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/package-info.java new file mode 100644 index 000000000000..9c42c9a88b94 --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/package-info.java @@ -0,0 +1,38 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to Data Labeling API. + * + *

The interfaces provided are listed below, along with usage samples. + * + *

========================= DataLabelingServiceClient ========================= + * + *

Service Description: + * + *

Sample for DataLabelingServiceClient: + * + *

+ * 
+ * try (DataLabelingServiceClient dataLabelingServiceClient = DataLabelingServiceClient.create()) {
+ *   String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]");
+ *   Dataset dataset = Dataset.newBuilder().build();
+ *   Dataset response = dataLabelingServiceClient.createDataset(formattedParent, dataset);
+ * }
+ * 
+ * 
+ */ +package com.google.cloud.datalabeling.v1beta1; diff --git a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/DataLabelingServiceStub.java b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/DataLabelingServiceStub.java new file mode 100644 index 000000000000..d0022e8b0d81 --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/DataLabelingServiceStub.java @@ -0,0 +1,274 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.datalabeling.v1beta1.stub; + +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotatedDatasetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotationSpecSetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListDataItemsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListDatasetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListExamplesPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListInstructionsPagedResponse; + +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.datalabeling.v1beta1.AnnotatedDataset; +import com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet; +import com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest; +import com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata; +import com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest; +import com.google.cloud.datalabeling.v1beta1.DataItem; +import com.google.cloud.datalabeling.v1beta1.Dataset; +import com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest; +import com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest; +import com.google.cloud.datalabeling.v1beta1.Example; +import com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata; +import com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse; +import com.google.cloud.datalabeling.v1beta1.ExportDataRequest; +import com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest; +import com.google.cloud.datalabeling.v1beta1.GetDataItemRequest; +import com.google.cloud.datalabeling.v1beta1.GetDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.GetExampleRequest; +import com.google.cloud.datalabeling.v1beta1.GetInstructionRequest; +import com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata; +import com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse; +import com.google.cloud.datalabeling.v1beta1.ImportDataRequest; +import com.google.cloud.datalabeling.v1beta1.Instruction; +import com.google.cloud.datalabeling.v1beta1.LabelAudioRequest; +import com.google.cloud.datalabeling.v1beta1.LabelImageRequest; +import com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata; +import com.google.cloud.datalabeling.v1beta1.LabelTextRequest; +import com.google.cloud.datalabeling.v1beta1.LabelVideoRequest; +import com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest; +import com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse; +import com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest; +import com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse; +import com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest; +import com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse; +import com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest; +import com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse; +import com.google.cloud.datalabeling.v1beta1.ListExamplesRequest; +import com.google.cloud.datalabeling.v1beta1.ListExamplesResponse; +import com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest; +import com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Data Labeling API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class DataLabelingServiceStub 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 createDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: createDatasetCallable()"); + } + + public UnaryCallable getDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: getDatasetCallable()"); + } + + public UnaryCallable listDatasetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDatasetsPagedCallable()"); + } + + public UnaryCallable listDatasetsCallable() { + throw new UnsupportedOperationException("Not implemented: listDatasetsCallable()"); + } + + public UnaryCallable deleteDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDatasetCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ImportDataRequest, ImportDataOperationResponse, ImportDataOperationMetadata> + importDataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: importDataOperationCallable()"); + } + + public UnaryCallable importDataCallable() { + throw new UnsupportedOperationException("Not implemented: importDataCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata> + exportDataOperationCallable() { + throw new UnsupportedOperationException("Not implemented: exportDataOperationCallable()"); + } + + public UnaryCallable exportDataCallable() { + throw new UnsupportedOperationException("Not implemented: exportDataCallable()"); + } + + public UnaryCallable getDataItemCallable() { + throw new UnsupportedOperationException("Not implemented: getDataItemCallable()"); + } + + public UnaryCallable + listDataItemsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDataItemsPagedCallable()"); + } + + public UnaryCallable listDataItemsCallable() { + throw new UnsupportedOperationException("Not implemented: listDataItemsCallable()"); + } + + public UnaryCallable getAnnotatedDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: getAnnotatedDatasetCallable()"); + } + + public UnaryCallable + listAnnotatedDatasetsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAnnotatedDatasetsPagedCallable()"); + } + + public UnaryCallable + listAnnotatedDatasetsCallable() { + throw new UnsupportedOperationException("Not implemented: listAnnotatedDatasetsCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + labelImageOperationCallable() { + throw new UnsupportedOperationException("Not implemented: labelImageOperationCallable()"); + } + + public UnaryCallable labelImageCallable() { + throw new UnsupportedOperationException("Not implemented: labelImageCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + labelVideoOperationCallable() { + throw new UnsupportedOperationException("Not implemented: labelVideoOperationCallable()"); + } + + public UnaryCallable labelVideoCallable() { + throw new UnsupportedOperationException("Not implemented: labelVideoCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + labelTextOperationCallable() { + throw new UnsupportedOperationException("Not implemented: labelTextOperationCallable()"); + } + + public UnaryCallable labelTextCallable() { + throw new UnsupportedOperationException("Not implemented: labelTextCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + labelAudioOperationCallable() { + throw new UnsupportedOperationException("Not implemented: labelAudioOperationCallable()"); + } + + public UnaryCallable labelAudioCallable() { + throw new UnsupportedOperationException("Not implemented: labelAudioCallable()"); + } + + public UnaryCallable getExampleCallable() { + throw new UnsupportedOperationException("Not implemented: getExampleCallable()"); + } + + public UnaryCallable listExamplesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listExamplesPagedCallable()"); + } + + public UnaryCallable listExamplesCallable() { + throw new UnsupportedOperationException("Not implemented: listExamplesCallable()"); + } + + public UnaryCallable + createAnnotationSpecSetCallable() { + throw new UnsupportedOperationException("Not implemented: createAnnotationSpecSetCallable()"); + } + + public UnaryCallable + getAnnotationSpecSetCallable() { + throw new UnsupportedOperationException("Not implemented: getAnnotationSpecSetCallable()"); + } + + public UnaryCallable + listAnnotationSpecSetsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listAnnotationSpecSetsPagedCallable()"); + } + + public UnaryCallable + listAnnotationSpecSetsCallable() { + throw new UnsupportedOperationException("Not implemented: listAnnotationSpecSetsCallable()"); + } + + public UnaryCallable deleteAnnotationSpecSetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAnnotationSpecSetCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + createInstructionOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createInstructionOperationCallable()"); + } + + public UnaryCallable createInstructionCallable() { + throw new UnsupportedOperationException("Not implemented: createInstructionCallable()"); + } + + public UnaryCallable getInstructionCallable() { + throw new UnsupportedOperationException("Not implemented: getInstructionCallable()"); + } + + public UnaryCallable + listInstructionsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listInstructionsPagedCallable()"); + } + + public UnaryCallable + listInstructionsCallable() { + throw new UnsupportedOperationException("Not implemented: listInstructionsCallable()"); + } + + public UnaryCallable deleteInstructionCallable() { + throw new UnsupportedOperationException("Not implemented: deleteInstructionCallable()"); + } + + public UnaryCallable deleteAnnotatedDatasetCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAnnotatedDatasetCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/DataLabelingServiceStubSettings.java b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/DataLabelingServiceStubSettings.java new file mode 100644 index 000000000000..d203cd2d0473 --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/DataLabelingServiceStubSettings.java @@ -0,0 +1,1659 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.datalabeling.v1beta1.stub; + +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotatedDatasetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotationSpecSetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListDataItemsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListDatasetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListExamplesPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListInstructionsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +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.ApiCallContext; +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.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +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.api.gax.rpc.UnaryCallable; +import com.google.cloud.datalabeling.v1beta1.AnnotatedDataset; +import com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet; +import com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest; +import com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata; +import com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest; +import com.google.cloud.datalabeling.v1beta1.DataItem; +import com.google.cloud.datalabeling.v1beta1.Dataset; +import com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest; +import com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest; +import com.google.cloud.datalabeling.v1beta1.Example; +import com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata; +import com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse; +import com.google.cloud.datalabeling.v1beta1.ExportDataRequest; +import com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest; +import com.google.cloud.datalabeling.v1beta1.GetDataItemRequest; +import com.google.cloud.datalabeling.v1beta1.GetDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.GetExampleRequest; +import com.google.cloud.datalabeling.v1beta1.GetInstructionRequest; +import com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata; +import com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse; +import com.google.cloud.datalabeling.v1beta1.ImportDataRequest; +import com.google.cloud.datalabeling.v1beta1.Instruction; +import com.google.cloud.datalabeling.v1beta1.LabelAudioRequest; +import com.google.cloud.datalabeling.v1beta1.LabelImageRequest; +import com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata; +import com.google.cloud.datalabeling.v1beta1.LabelTextRequest; +import com.google.cloud.datalabeling.v1beta1.LabelVideoRequest; +import com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest; +import com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse; +import com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest; +import com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse; +import com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest; +import com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse; +import com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest; +import com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse; +import com.google.cloud.datalabeling.v1beta1.ListExamplesRequest; +import com.google.cloud.datalabeling.v1beta1.ListExamplesResponse; +import com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest; +import com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link DataLabelingServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (datalabeling.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of createDataset to 30 seconds: + * + *

+ * 
+ * DataLabelingServiceStubSettings.Builder dataLabelingServiceSettingsBuilder =
+ *     DataLabelingServiceStubSettings.newBuilder();
+ * dataLabelingServiceSettingsBuilder.createDatasetSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * DataLabelingServiceStubSettings dataLabelingServiceSettings = dataLabelingServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataLabelingServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings createDatasetSettings; + private final UnaryCallSettings getDatasetSettings; + private final PagedCallSettings< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings; + private final UnaryCallSettings deleteDatasetSettings; + private final UnaryCallSettings importDataSettings; + private final OperationCallSettings< + ImportDataRequest, ImportDataOperationResponse, ImportDataOperationMetadata> + importDataOperationSettings; + private final UnaryCallSettings exportDataSettings; + private final OperationCallSettings< + ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata> + exportDataOperationSettings; + private final UnaryCallSettings getDataItemSettings; + private final PagedCallSettings< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse> + listDataItemsSettings; + private final UnaryCallSettings + getAnnotatedDatasetSettings; + private final PagedCallSettings< + ListAnnotatedDatasetsRequest, + ListAnnotatedDatasetsResponse, + ListAnnotatedDatasetsPagedResponse> + listAnnotatedDatasetsSettings; + private final UnaryCallSettings labelImageSettings; + private final OperationCallSettings + labelImageOperationSettings; + private final UnaryCallSettings labelVideoSettings; + private final OperationCallSettings + labelVideoOperationSettings; + private final UnaryCallSettings labelTextSettings; + private final OperationCallSettings + labelTextOperationSettings; + private final UnaryCallSettings labelAudioSettings; + private final OperationCallSettings + labelAudioOperationSettings; + private final UnaryCallSettings getExampleSettings; + private final PagedCallSettings< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings; + private final UnaryCallSettings + createAnnotationSpecSetSettings; + private final UnaryCallSettings + getAnnotationSpecSetSettings; + private final PagedCallSettings< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + ListAnnotationSpecSetsPagedResponse> + listAnnotationSpecSetsSettings; + private final UnaryCallSettings + deleteAnnotationSpecSetSettings; + private final UnaryCallSettings createInstructionSettings; + private final OperationCallSettings< + CreateInstructionRequest, Instruction, CreateInstructionMetadata> + createInstructionOperationSettings; + private final UnaryCallSettings getInstructionSettings; + private final PagedCallSettings< + ListInstructionsRequest, ListInstructionsResponse, ListInstructionsPagedResponse> + listInstructionsSettings; + private final UnaryCallSettings deleteInstructionSettings; + private final UnaryCallSettings + deleteAnnotatedDatasetSettings; + + /** 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 getDataset. */ + public UnaryCallSettings getDatasetSettings() { + return getDatasetSettings; + } + + /** Returns the object with the settings used for calls to listDatasets. */ + public PagedCallSettings + listDatasetsSettings() { + return listDatasetsSettings; + } + + /** Returns the object with the settings used for calls to deleteDataset. */ + public UnaryCallSettings deleteDatasetSettings() { + return deleteDatasetSettings; + } + + /** Returns the object with the settings used for calls to importData. */ + public UnaryCallSettings importDataSettings() { + return importDataSettings; + } + + /** Returns the object with the settings used for calls to importData. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + ImportDataRequest, ImportDataOperationResponse, ImportDataOperationMetadata> + importDataOperationSettings() { + return importDataOperationSettings; + } + + /** Returns the object with the settings used for calls to exportData. */ + public UnaryCallSettings exportDataSettings() { + return exportDataSettings; + } + + /** Returns the object with the settings used for calls to exportData. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata> + exportDataOperationSettings() { + return exportDataOperationSettings; + } + + /** Returns the object with the settings used for calls to getDataItem. */ + public UnaryCallSettings getDataItemSettings() { + return getDataItemSettings; + } + + /** Returns the object with the settings used for calls to listDataItems. */ + public PagedCallSettings + listDataItemsSettings() { + return listDataItemsSettings; + } + + /** Returns the object with the settings used for calls to getAnnotatedDataset. */ + public UnaryCallSettings + getAnnotatedDatasetSettings() { + return getAnnotatedDatasetSettings; + } + + /** Returns the object with the settings used for calls to listAnnotatedDatasets. */ + public PagedCallSettings< + ListAnnotatedDatasetsRequest, + ListAnnotatedDatasetsResponse, + ListAnnotatedDatasetsPagedResponse> + listAnnotatedDatasetsSettings() { + return listAnnotatedDatasetsSettings; + } + + /** Returns the object with the settings used for calls to labelImage. */ + public UnaryCallSettings labelImageSettings() { + return labelImageSettings; + } + + /** Returns the object with the settings used for calls to labelImage. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + labelImageOperationSettings() { + return labelImageOperationSettings; + } + + /** Returns the object with the settings used for calls to labelVideo. */ + public UnaryCallSettings labelVideoSettings() { + return labelVideoSettings; + } + + /** Returns the object with the settings used for calls to labelVideo. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + labelVideoOperationSettings() { + return labelVideoOperationSettings; + } + + /** Returns the object with the settings used for calls to labelText. */ + public UnaryCallSettings labelTextSettings() { + return labelTextSettings; + } + + /** Returns the object with the settings used for calls to labelText. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + labelTextOperationSettings() { + return labelTextOperationSettings; + } + + /** Returns the object with the settings used for calls to labelAudio. */ + public UnaryCallSettings labelAudioSettings() { + return labelAudioSettings; + } + + /** Returns the object with the settings used for calls to labelAudio. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + labelAudioOperationSettings() { + return labelAudioOperationSettings; + } + + /** Returns the object with the settings used for calls to getExample. */ + public UnaryCallSettings getExampleSettings() { + return getExampleSettings; + } + + /** Returns the object with the settings used for calls to listExamples. */ + public PagedCallSettings + listExamplesSettings() { + return listExamplesSettings; + } + + /** Returns the object with the settings used for calls to createAnnotationSpecSet. */ + public UnaryCallSettings + createAnnotationSpecSetSettings() { + return createAnnotationSpecSetSettings; + } + + /** Returns the object with the settings used for calls to getAnnotationSpecSet. */ + public UnaryCallSettings + getAnnotationSpecSetSettings() { + return getAnnotationSpecSetSettings; + } + + /** Returns the object with the settings used for calls to listAnnotationSpecSets. */ + public PagedCallSettings< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + ListAnnotationSpecSetsPagedResponse> + listAnnotationSpecSetsSettings() { + return listAnnotationSpecSetsSettings; + } + + /** Returns the object with the settings used for calls to deleteAnnotationSpecSet. */ + public UnaryCallSettings + deleteAnnotationSpecSetSettings() { + return deleteAnnotationSpecSetSettings; + } + + /** Returns the object with the settings used for calls to createInstruction. */ + public UnaryCallSettings createInstructionSettings() { + return createInstructionSettings; + } + + /** Returns the object with the settings used for calls to createInstruction. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings + createInstructionOperationSettings() { + return createInstructionOperationSettings; + } + + /** Returns the object with the settings used for calls to getInstruction. */ + public UnaryCallSettings getInstructionSettings() { + return getInstructionSettings; + } + + /** Returns the object with the settings used for calls to listInstructions. */ + public PagedCallSettings< + ListInstructionsRequest, ListInstructionsResponse, ListInstructionsPagedResponse> + listInstructionsSettings() { + return listInstructionsSettings; + } + + /** Returns the object with the settings used for calls to deleteInstruction. */ + public UnaryCallSettings deleteInstructionSettings() { + return deleteInstructionSettings; + } + + /** Returns the object with the settings used for calls to deleteAnnotatedDataset. */ + public UnaryCallSettings deleteAnnotatedDatasetSettings() { + return deleteAnnotatedDatasetSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataLabelingServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataLabelingServiceStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "datalabeling.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(DataLabelingServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected DataLabelingServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createDatasetSettings = settingsBuilder.createDatasetSettings().build(); + getDatasetSettings = settingsBuilder.getDatasetSettings().build(); + listDatasetsSettings = settingsBuilder.listDatasetsSettings().build(); + deleteDatasetSettings = settingsBuilder.deleteDatasetSettings().build(); + importDataSettings = settingsBuilder.importDataSettings().build(); + importDataOperationSettings = settingsBuilder.importDataOperationSettings().build(); + exportDataSettings = settingsBuilder.exportDataSettings().build(); + exportDataOperationSettings = settingsBuilder.exportDataOperationSettings().build(); + getDataItemSettings = settingsBuilder.getDataItemSettings().build(); + listDataItemsSettings = settingsBuilder.listDataItemsSettings().build(); + getAnnotatedDatasetSettings = settingsBuilder.getAnnotatedDatasetSettings().build(); + listAnnotatedDatasetsSettings = settingsBuilder.listAnnotatedDatasetsSettings().build(); + labelImageSettings = settingsBuilder.labelImageSettings().build(); + labelImageOperationSettings = settingsBuilder.labelImageOperationSettings().build(); + labelVideoSettings = settingsBuilder.labelVideoSettings().build(); + labelVideoOperationSettings = settingsBuilder.labelVideoOperationSettings().build(); + labelTextSettings = settingsBuilder.labelTextSettings().build(); + labelTextOperationSettings = settingsBuilder.labelTextOperationSettings().build(); + labelAudioSettings = settingsBuilder.labelAudioSettings().build(); + labelAudioOperationSettings = settingsBuilder.labelAudioOperationSettings().build(); + getExampleSettings = settingsBuilder.getExampleSettings().build(); + listExamplesSettings = settingsBuilder.listExamplesSettings().build(); + createAnnotationSpecSetSettings = settingsBuilder.createAnnotationSpecSetSettings().build(); + getAnnotationSpecSetSettings = settingsBuilder.getAnnotationSpecSetSettings().build(); + listAnnotationSpecSetsSettings = settingsBuilder.listAnnotationSpecSetsSettings().build(); + deleteAnnotationSpecSetSettings = settingsBuilder.deleteAnnotationSpecSetSettings().build(); + createInstructionSettings = settingsBuilder.createInstructionSettings().build(); + createInstructionOperationSettings = + settingsBuilder.createInstructionOperationSettings().build(); + getInstructionSettings = settingsBuilder.getInstructionSettings().build(); + listInstructionsSettings = settingsBuilder.listInstructionsSettings().build(); + deleteInstructionSettings = settingsBuilder.deleteInstructionSettings().build(); + deleteAnnotatedDatasetSettings = settingsBuilder.deleteAnnotatedDatasetSettings().build(); + } + + private static final PagedListDescriptor + LIST_DATASETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDatasetsRequest injectToken(ListDatasetsRequest payload, String token) { + return ListDatasetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDatasetsRequest injectPageSize(ListDatasetsRequest payload, int pageSize) { + return ListDatasetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDatasetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDatasetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDatasetsResponse payload) { + return payload.getDatasetsList() != null + ? payload.getDatasetsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor + LIST_DATA_ITEMS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataItemsRequest injectToken(ListDataItemsRequest payload, String token) { + return ListDataItemsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDataItemsRequest injectPageSize(ListDataItemsRequest payload, int pageSize) { + return ListDataItemsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDataItemsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataItemsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDataItemsResponse payload) { + return payload.getDataItemsList() != null + ? payload.getDataItemsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListAnnotatedDatasetsRequest, ListAnnotatedDatasetsResponse, AnnotatedDataset> + LIST_ANNOTATED_DATASETS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAnnotatedDatasetsRequest, ListAnnotatedDatasetsResponse, AnnotatedDataset>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAnnotatedDatasetsRequest injectToken( + ListAnnotatedDatasetsRequest payload, String token) { + return ListAnnotatedDatasetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAnnotatedDatasetsRequest injectPageSize( + ListAnnotatedDatasetsRequest payload, int pageSize) { + return ListAnnotatedDatasetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAnnotatedDatasetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAnnotatedDatasetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListAnnotatedDatasetsResponse payload) { + return payload.getAnnotatedDatasetsList() != null + ? payload.getAnnotatedDatasetsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor + LIST_EXAMPLES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListExamplesRequest injectToken(ListExamplesRequest payload, String token) { + return ListExamplesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListExamplesRequest injectPageSize(ListExamplesRequest payload, int pageSize) { + return ListExamplesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListExamplesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListExamplesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListExamplesResponse payload) { + return payload.getExamplesList() != null + ? payload.getExamplesList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListAnnotationSpecSetsRequest, ListAnnotationSpecSetsResponse, AnnotationSpecSet> + LIST_ANNOTATION_SPEC_SETS_PAGE_STR_DESC = + new PagedListDescriptor< + ListAnnotationSpecSetsRequest, ListAnnotationSpecSetsResponse, AnnotationSpecSet>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAnnotationSpecSetsRequest injectToken( + ListAnnotationSpecSetsRequest payload, String token) { + return ListAnnotationSpecSetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAnnotationSpecSetsRequest injectPageSize( + ListAnnotationSpecSetsRequest payload, int pageSize) { + return ListAnnotationSpecSetsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListAnnotationSpecSetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAnnotationSpecSetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListAnnotationSpecSetsResponse payload) { + return payload.getAnnotationSpecSetsList() != null + ? payload.getAnnotationSpecSetsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListInstructionsRequest, ListInstructionsResponse, Instruction> + LIST_INSTRUCTIONS_PAGE_STR_DESC = + new PagedListDescriptor< + ListInstructionsRequest, ListInstructionsResponse, Instruction>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListInstructionsRequest injectToken( + ListInstructionsRequest payload, String token) { + return ListInstructionsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListInstructionsRequest injectPageSize( + ListInstructionsRequest payload, int pageSize) { + return ListInstructionsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListInstructionsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListInstructionsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListInstructionsResponse payload) { + return payload.getInstructionsList() != null + ? payload.getInstructionsList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + LIST_DATASETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDatasetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATASETS_PAGE_STR_DESC, request, context); + return ListDatasetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse> + LIST_DATA_ITEMS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDataItemsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATA_ITEMS_PAGE_STR_DESC, request, context); + return ListDataItemsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAnnotatedDatasetsRequest, + ListAnnotatedDatasetsResponse, + ListAnnotatedDatasetsPagedResponse> + LIST_ANNOTATED_DATASETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAnnotatedDatasetsRequest, + ListAnnotatedDatasetsResponse, + ListAnnotatedDatasetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAnnotatedDatasetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAnnotatedDatasetsRequest, ListAnnotatedDatasetsResponse, AnnotatedDataset> + pageContext = + PageContext.create( + callable, LIST_ANNOTATED_DATASETS_PAGE_STR_DESC, request, context); + return ListAnnotatedDatasetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + LIST_EXAMPLES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListExamplesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_EXAMPLES_PAGE_STR_DESC, request, context); + return ListExamplesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + ListAnnotationSpecSetsPagedResponse> + LIST_ANNOTATION_SPEC_SETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + ListAnnotationSpecSetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListAnnotationSpecSetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + AnnotationSpecSet> + pageContext = + PageContext.create( + callable, LIST_ANNOTATION_SPEC_SETS_PAGE_STR_DESC, request, context); + return ListAnnotationSpecSetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListInstructionsRequest, ListInstructionsResponse, ListInstructionsPagedResponse> + LIST_INSTRUCTIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListInstructionsRequest, ListInstructionsResponse, ListInstructionsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListInstructionsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_INSTRUCTIONS_PAGE_STR_DESC, request, context); + return ListInstructionsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Builder for DataLabelingServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder createDatasetSettings; + private final UnaryCallSettings.Builder getDatasetSettings; + private final PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings; + private final UnaryCallSettings.Builder deleteDatasetSettings; + private final UnaryCallSettings.Builder importDataSettings; + private final OperationCallSettings.Builder< + ImportDataRequest, ImportDataOperationResponse, ImportDataOperationMetadata> + importDataOperationSettings; + private final UnaryCallSettings.Builder exportDataSettings; + private final OperationCallSettings.Builder< + ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata> + exportDataOperationSettings; + private final UnaryCallSettings.Builder getDataItemSettings; + private final PagedCallSettings.Builder< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse> + listDataItemsSettings; + private final UnaryCallSettings.Builder + getAnnotatedDatasetSettings; + private final PagedCallSettings.Builder< + ListAnnotatedDatasetsRequest, + ListAnnotatedDatasetsResponse, + ListAnnotatedDatasetsPagedResponse> + listAnnotatedDatasetsSettings; + private final UnaryCallSettings.Builder labelImageSettings; + private final OperationCallSettings.Builder< + LabelImageRequest, AnnotatedDataset, LabelOperationMetadata> + labelImageOperationSettings; + private final UnaryCallSettings.Builder labelVideoSettings; + private final OperationCallSettings.Builder< + LabelVideoRequest, AnnotatedDataset, LabelOperationMetadata> + labelVideoOperationSettings; + private final UnaryCallSettings.Builder labelTextSettings; + private final OperationCallSettings.Builder< + LabelTextRequest, AnnotatedDataset, LabelOperationMetadata> + labelTextOperationSettings; + private final UnaryCallSettings.Builder labelAudioSettings; + private final OperationCallSettings.Builder< + LabelAudioRequest, AnnotatedDataset, LabelOperationMetadata> + labelAudioOperationSettings; + private final UnaryCallSettings.Builder getExampleSettings; + private final PagedCallSettings.Builder< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings; + private final UnaryCallSettings.Builder + createAnnotationSpecSetSettings; + private final UnaryCallSettings.Builder + getAnnotationSpecSetSettings; + private final PagedCallSettings.Builder< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + ListAnnotationSpecSetsPagedResponse> + listAnnotationSpecSetsSettings; + private final UnaryCallSettings.Builder + deleteAnnotationSpecSetSettings; + private final UnaryCallSettings.Builder + createInstructionSettings; + private final OperationCallSettings.Builder< + CreateInstructionRequest, Instruction, CreateInstructionMetadata> + createInstructionOperationSettings; + private final UnaryCallSettings.Builder + getInstructionSettings; + private final PagedCallSettings.Builder< + ListInstructionsRequest, ListInstructionsResponse, ListInstructionsPagedResponse> + listInstructionsSettings; + private final UnaryCallSettings.Builder + deleteInstructionSettings; + private final UnaryCallSettings.Builder + deleteAnnotatedDatasetSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(30000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listDatasetsSettings = PagedCallSettings.newBuilder(LIST_DATASETS_PAGE_STR_FACT); + + deleteDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + importDataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + importDataOperationSettings = OperationCallSettings.newBuilder(); + + exportDataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + exportDataOperationSettings = OperationCallSettings.newBuilder(); + + getDataItemSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listDataItemsSettings = PagedCallSettings.newBuilder(LIST_DATA_ITEMS_PAGE_STR_FACT); + + getAnnotatedDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listAnnotatedDatasetsSettings = + PagedCallSettings.newBuilder(LIST_ANNOTATED_DATASETS_PAGE_STR_FACT); + + labelImageSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + labelImageOperationSettings = OperationCallSettings.newBuilder(); + + labelVideoSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + labelVideoOperationSettings = OperationCallSettings.newBuilder(); + + labelTextSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + labelTextOperationSettings = OperationCallSettings.newBuilder(); + + labelAudioSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + labelAudioOperationSettings = OperationCallSettings.newBuilder(); + + getExampleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listExamplesSettings = PagedCallSettings.newBuilder(LIST_EXAMPLES_PAGE_STR_FACT); + + createAnnotationSpecSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getAnnotationSpecSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listAnnotationSpecSetsSettings = + PagedCallSettings.newBuilder(LIST_ANNOTATION_SPEC_SETS_PAGE_STR_FACT); + + deleteAnnotationSpecSetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createInstructionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createInstructionOperationSettings = OperationCallSettings.newBuilder(); + + getInstructionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listInstructionsSettings = PagedCallSettings.newBuilder(LIST_INSTRUCTIONS_PAGE_STR_FACT); + + deleteInstructionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteAnnotatedDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createDatasetSettings, + getDatasetSettings, + listDatasetsSettings, + deleteDatasetSettings, + importDataSettings, + exportDataSettings, + getDataItemSettings, + listDataItemsSettings, + getAnnotatedDatasetSettings, + listAnnotatedDatasetsSettings, + labelImageSettings, + labelVideoSettings, + labelTextSettings, + labelAudioSettings, + getExampleSettings, + listExamplesSettings, + createAnnotationSpecSetSettings, + getAnnotationSpecSetSettings, + listAnnotationSpecSetsSettings, + deleteAnnotationSpecSetSettings, + createInstructionSettings, + getInstructionSettings, + listInstructionsSettings, + deleteInstructionSettings, + deleteAnnotatedDatasetSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .createDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listDatasetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .importDataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .exportDataSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getDataItemSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listDataItemsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getAnnotatedDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listAnnotatedDatasetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .labelImageSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .labelVideoSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .labelTextSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .labelAudioSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getExampleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listExamplesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createAnnotationSpecSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getAnnotationSpecSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listAnnotationSpecSetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteAnnotationSpecSetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createInstructionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getInstructionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listInstructionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteInstructionSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteAnnotatedDatasetSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .importDataOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ImportDataOperationResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ImportDataOperationMetadata.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 + .exportDataOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ExportDataOperationResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ExportDataOperationMetadata.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 + .labelImageOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AnnotatedDataset.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(LabelOperationMetadata.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 + .labelVideoOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AnnotatedDataset.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(LabelOperationMetadata.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 + .labelTextOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AnnotatedDataset.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(LabelOperationMetadata.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 + .labelAudioOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AnnotatedDataset.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(LabelOperationMetadata.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 + .createInstructionOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Instruction.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateInstructionMetadata.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; + } + + protected Builder(DataLabelingServiceStubSettings settings) { + super(settings); + + createDatasetSettings = settings.createDatasetSettings.toBuilder(); + getDatasetSettings = settings.getDatasetSettings.toBuilder(); + listDatasetsSettings = settings.listDatasetsSettings.toBuilder(); + deleteDatasetSettings = settings.deleteDatasetSettings.toBuilder(); + importDataSettings = settings.importDataSettings.toBuilder(); + importDataOperationSettings = settings.importDataOperationSettings.toBuilder(); + exportDataSettings = settings.exportDataSettings.toBuilder(); + exportDataOperationSettings = settings.exportDataOperationSettings.toBuilder(); + getDataItemSettings = settings.getDataItemSettings.toBuilder(); + listDataItemsSettings = settings.listDataItemsSettings.toBuilder(); + getAnnotatedDatasetSettings = settings.getAnnotatedDatasetSettings.toBuilder(); + listAnnotatedDatasetsSettings = settings.listAnnotatedDatasetsSettings.toBuilder(); + labelImageSettings = settings.labelImageSettings.toBuilder(); + labelImageOperationSettings = settings.labelImageOperationSettings.toBuilder(); + labelVideoSettings = settings.labelVideoSettings.toBuilder(); + labelVideoOperationSettings = settings.labelVideoOperationSettings.toBuilder(); + labelTextSettings = settings.labelTextSettings.toBuilder(); + labelTextOperationSettings = settings.labelTextOperationSettings.toBuilder(); + labelAudioSettings = settings.labelAudioSettings.toBuilder(); + labelAudioOperationSettings = settings.labelAudioOperationSettings.toBuilder(); + getExampleSettings = settings.getExampleSettings.toBuilder(); + listExamplesSettings = settings.listExamplesSettings.toBuilder(); + createAnnotationSpecSetSettings = settings.createAnnotationSpecSetSettings.toBuilder(); + getAnnotationSpecSetSettings = settings.getAnnotationSpecSetSettings.toBuilder(); + listAnnotationSpecSetsSettings = settings.listAnnotationSpecSetsSettings.toBuilder(); + deleteAnnotationSpecSetSettings = settings.deleteAnnotationSpecSetSettings.toBuilder(); + createInstructionSettings = settings.createInstructionSettings.toBuilder(); + createInstructionOperationSettings = settings.createInstructionOperationSettings.toBuilder(); + getInstructionSettings = settings.getInstructionSettings.toBuilder(); + listInstructionsSettings = settings.listInstructionsSettings.toBuilder(); + deleteInstructionSettings = settings.deleteInstructionSettings.toBuilder(); + deleteAnnotatedDatasetSettings = settings.deleteAnnotatedDatasetSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createDatasetSettings, + getDatasetSettings, + listDatasetsSettings, + deleteDatasetSettings, + importDataSettings, + exportDataSettings, + getDataItemSettings, + listDataItemsSettings, + getAnnotatedDatasetSettings, + listAnnotatedDatasetsSettings, + labelImageSettings, + labelVideoSettings, + labelTextSettings, + labelAudioSettings, + getExampleSettings, + listExamplesSettings, + createAnnotationSpecSetSettings, + getAnnotationSpecSetSettings, + listAnnotationSpecSetsSettings, + deleteAnnotationSpecSetSettings, + createInstructionSettings, + getInstructionSettings, + listInstructionsSettings, + deleteInstructionSettings, + deleteAnnotatedDatasetSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createDataset. */ + public UnaryCallSettings.Builder createDatasetSettings() { + return createDatasetSettings; + } + + /** Returns the builder for the settings used for calls to getDataset. */ + public UnaryCallSettings.Builder getDatasetSettings() { + return getDatasetSettings; + } + + /** Returns the builder for the settings used for calls to listDatasets. */ + public PagedCallSettings.Builder< + ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> + listDatasetsSettings() { + return listDatasetsSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataset. */ + public UnaryCallSettings.Builder deleteDatasetSettings() { + return deleteDatasetSettings; + } + + /** Returns the builder for the settings used for calls to importData. */ + public UnaryCallSettings.Builder importDataSettings() { + return importDataSettings; + } + + /** Returns the builder for the settings used for calls to importData. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ImportDataRequest, ImportDataOperationResponse, ImportDataOperationMetadata> + importDataOperationSettings() { + return importDataOperationSettings; + } + + /** Returns the builder for the settings used for calls to exportData. */ + public UnaryCallSettings.Builder exportDataSettings() { + return exportDataSettings; + } + + /** Returns the builder for the settings used for calls to exportData. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata> + exportDataOperationSettings() { + return exportDataOperationSettings; + } + + /** Returns the builder for the settings used for calls to getDataItem. */ + public UnaryCallSettings.Builder getDataItemSettings() { + return getDataItemSettings; + } + + /** Returns the builder for the settings used for calls to listDataItems. */ + public PagedCallSettings.Builder< + ListDataItemsRequest, ListDataItemsResponse, ListDataItemsPagedResponse> + listDataItemsSettings() { + return listDataItemsSettings; + } + + /** Returns the builder for the settings used for calls to getAnnotatedDataset. */ + public UnaryCallSettings.Builder + getAnnotatedDatasetSettings() { + return getAnnotatedDatasetSettings; + } + + /** Returns the builder for the settings used for calls to listAnnotatedDatasets. */ + public PagedCallSettings.Builder< + ListAnnotatedDatasetsRequest, + ListAnnotatedDatasetsResponse, + ListAnnotatedDatasetsPagedResponse> + listAnnotatedDatasetsSettings() { + return listAnnotatedDatasetsSettings; + } + + /** Returns the builder for the settings used for calls to labelImage. */ + public UnaryCallSettings.Builder labelImageSettings() { + return labelImageSettings; + } + + /** Returns the builder for the settings used for calls to labelImage. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + LabelImageRequest, AnnotatedDataset, LabelOperationMetadata> + labelImageOperationSettings() { + return labelImageOperationSettings; + } + + /** Returns the builder for the settings used for calls to labelVideo. */ + public UnaryCallSettings.Builder labelVideoSettings() { + return labelVideoSettings; + } + + /** Returns the builder for the settings used for calls to labelVideo. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + LabelVideoRequest, AnnotatedDataset, LabelOperationMetadata> + labelVideoOperationSettings() { + return labelVideoOperationSettings; + } + + /** Returns the builder for the settings used for calls to labelText. */ + public UnaryCallSettings.Builder labelTextSettings() { + return labelTextSettings; + } + + /** Returns the builder for the settings used for calls to labelText. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + labelTextOperationSettings() { + return labelTextOperationSettings; + } + + /** Returns the builder for the settings used for calls to labelAudio. */ + public UnaryCallSettings.Builder labelAudioSettings() { + return labelAudioSettings; + } + + /** Returns the builder for the settings used for calls to labelAudio. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + LabelAudioRequest, AnnotatedDataset, LabelOperationMetadata> + labelAudioOperationSettings() { + return labelAudioOperationSettings; + } + + /** Returns the builder for the settings used for calls to getExample. */ + public UnaryCallSettings.Builder getExampleSettings() { + return getExampleSettings; + } + + /** Returns the builder for the settings used for calls to listExamples. */ + public PagedCallSettings.Builder< + ListExamplesRequest, ListExamplesResponse, ListExamplesPagedResponse> + listExamplesSettings() { + return listExamplesSettings; + } + + /** Returns the builder for the settings used for calls to createAnnotationSpecSet. */ + public UnaryCallSettings.Builder + createAnnotationSpecSetSettings() { + return createAnnotationSpecSetSettings; + } + + /** Returns the builder for the settings used for calls to getAnnotationSpecSet. */ + public UnaryCallSettings.Builder + getAnnotationSpecSetSettings() { + return getAnnotationSpecSetSettings; + } + + /** Returns the builder for the settings used for calls to listAnnotationSpecSets. */ + public PagedCallSettings.Builder< + ListAnnotationSpecSetsRequest, + ListAnnotationSpecSetsResponse, + ListAnnotationSpecSetsPagedResponse> + listAnnotationSpecSetsSettings() { + return listAnnotationSpecSetsSettings; + } + + /** Returns the builder for the settings used for calls to deleteAnnotationSpecSet. */ + public UnaryCallSettings.Builder + deleteAnnotationSpecSetSettings() { + return deleteAnnotationSpecSetSettings; + } + + /** Returns the builder for the settings used for calls to createInstruction. */ + public UnaryCallSettings.Builder + createInstructionSettings() { + return createInstructionSettings; + } + + /** Returns the builder for the settings used for calls to createInstruction. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateInstructionRequest, Instruction, CreateInstructionMetadata> + createInstructionOperationSettings() { + return createInstructionOperationSettings; + } + + /** Returns the builder for the settings used for calls to getInstruction. */ + public UnaryCallSettings.Builder getInstructionSettings() { + return getInstructionSettings; + } + + /** Returns the builder for the settings used for calls to listInstructions. */ + public PagedCallSettings.Builder< + ListInstructionsRequest, ListInstructionsResponse, ListInstructionsPagedResponse> + listInstructionsSettings() { + return listInstructionsSettings; + } + + /** Returns the builder for the settings used for calls to deleteInstruction. */ + public UnaryCallSettings.Builder deleteInstructionSettings() { + return deleteInstructionSettings; + } + + /** Returns the builder for the settings used for calls to deleteAnnotatedDataset. */ + public UnaryCallSettings.Builder + deleteAnnotatedDatasetSettings() { + return deleteAnnotatedDatasetSettings; + } + + @Override + public DataLabelingServiceStubSettings build() throws IOException { + return new DataLabelingServiceStubSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/GrpcDataLabelingServiceCallableFactory.java b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/GrpcDataLabelingServiceCallableFactory.java new file mode 100644 index 000000000000..d387e8cbf6ab --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/GrpcDataLabelingServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.datalabeling.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Data Labeling API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcDataLabelingServiceCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/GrpcDataLabelingServiceStub.java b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/GrpcDataLabelingServiceStub.java new file mode 100644 index 000000000000..9d007ff225eb --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/src/main/java/com/google/cloud/datalabeling/v1beta1/stub/GrpcDataLabelingServiceStub.java @@ -0,0 +1,1138 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.datalabeling.v1beta1.stub; + +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotatedDatasetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotationSpecSetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListDataItemsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListDatasetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListExamplesPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListInstructionsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +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.datalabeling.v1beta1.AnnotatedDataset; +import com.google.cloud.datalabeling.v1beta1.AnnotationSpecSet; +import com.google.cloud.datalabeling.v1beta1.CreateAnnotationSpecSetRequest; +import com.google.cloud.datalabeling.v1beta1.CreateDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.CreateInstructionMetadata; +import com.google.cloud.datalabeling.v1beta1.CreateInstructionRequest; +import com.google.cloud.datalabeling.v1beta1.DataItem; +import com.google.cloud.datalabeling.v1beta1.Dataset; +import com.google.cloud.datalabeling.v1beta1.DeleteAnnotatedDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.DeleteAnnotationSpecSetRequest; +import com.google.cloud.datalabeling.v1beta1.DeleteDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.DeleteInstructionRequest; +import com.google.cloud.datalabeling.v1beta1.Example; +import com.google.cloud.datalabeling.v1beta1.ExportDataOperationMetadata; +import com.google.cloud.datalabeling.v1beta1.ExportDataOperationResponse; +import com.google.cloud.datalabeling.v1beta1.ExportDataRequest; +import com.google.cloud.datalabeling.v1beta1.GetAnnotatedDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.GetAnnotationSpecSetRequest; +import com.google.cloud.datalabeling.v1beta1.GetDataItemRequest; +import com.google.cloud.datalabeling.v1beta1.GetDatasetRequest; +import com.google.cloud.datalabeling.v1beta1.GetExampleRequest; +import com.google.cloud.datalabeling.v1beta1.GetInstructionRequest; +import com.google.cloud.datalabeling.v1beta1.ImportDataOperationMetadata; +import com.google.cloud.datalabeling.v1beta1.ImportDataOperationResponse; +import com.google.cloud.datalabeling.v1beta1.ImportDataRequest; +import com.google.cloud.datalabeling.v1beta1.Instruction; +import com.google.cloud.datalabeling.v1beta1.LabelAudioRequest; +import com.google.cloud.datalabeling.v1beta1.LabelImageRequest; +import com.google.cloud.datalabeling.v1beta1.LabelOperationMetadata; +import com.google.cloud.datalabeling.v1beta1.LabelTextRequest; +import com.google.cloud.datalabeling.v1beta1.LabelVideoRequest; +import com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsRequest; +import com.google.cloud.datalabeling.v1beta1.ListAnnotatedDatasetsResponse; +import com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsRequest; +import com.google.cloud.datalabeling.v1beta1.ListAnnotationSpecSetsResponse; +import com.google.cloud.datalabeling.v1beta1.ListDataItemsRequest; +import com.google.cloud.datalabeling.v1beta1.ListDataItemsResponse; +import com.google.cloud.datalabeling.v1beta1.ListDatasetsRequest; +import com.google.cloud.datalabeling.v1beta1.ListDatasetsResponse; +import com.google.cloud.datalabeling.v1beta1.ListExamplesRequest; +import com.google.cloud.datalabeling.v1beta1.ListExamplesResponse; +import com.google.cloud.datalabeling.v1beta1.ListInstructionsRequest; +import com.google.cloud.datalabeling.v1beta1.ListInstructionsResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Data Labeling API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcDataLabelingServiceStub extends DataLabelingServiceStub { + + private static final MethodDescriptor + createDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/CreateDataset") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) + .build(); + private static final MethodDescriptor getDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datalabeling.v1beta1.DataLabelingService/GetDataset") + .setRequestMarshaller(ProtoUtils.marshaller(GetDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listDatasetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/ListDatasets") + .setRequestMarshaller(ProtoUtils.marshaller(ListDatasetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDatasetsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteDataset") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor importDataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datalabeling.v1beta1.DataLabelingService/ImportData") + .setRequestMarshaller(ProtoUtils.marshaller(ImportDataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor exportDataMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datalabeling.v1beta1.DataLabelingService/ExportData") + .setRequestMarshaller(ProtoUtils.marshaller(ExportDataRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor getDataItemMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datalabeling.v1beta1.DataLabelingService/GetDataItem") + .setRequestMarshaller(ProtoUtils.marshaller(GetDataItemRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataItem.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listDataItemsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/ListDataItems") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataItemsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataItemsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getAnnotatedDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/GetAnnotatedDataset") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAnnotatedDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AnnotatedDataset.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listAnnotatedDatasetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/ListAnnotatedDatasets") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAnnotatedDatasetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAnnotatedDatasetsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor labelImageMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datalabeling.v1beta1.DataLabelingService/LabelImage") + .setRequestMarshaller(ProtoUtils.marshaller(LabelImageRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor labelVideoMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datalabeling.v1beta1.DataLabelingService/LabelVideo") + .setRequestMarshaller(ProtoUtils.marshaller(LabelVideoRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor labelTextMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datalabeling.v1beta1.DataLabelingService/LabelText") + .setRequestMarshaller(ProtoUtils.marshaller(LabelTextRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor labelAudioMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datalabeling.v1beta1.DataLabelingService/LabelAudio") + .setRequestMarshaller(ProtoUtils.marshaller(LabelAudioRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor getExampleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.datalabeling.v1beta1.DataLabelingService/GetExample") + .setRequestMarshaller(ProtoUtils.marshaller(GetExampleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Example.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listExamplesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/ListExamples") + .setRequestMarshaller(ProtoUtils.marshaller(ListExamplesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListExamplesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + createAnnotationSpecSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/CreateAnnotationSpecSet") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAnnotationSpecSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AnnotationSpecSet.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getAnnotationSpecSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/GetAnnotationSpecSet") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAnnotationSpecSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AnnotationSpecSet.getDefaultInstance())) + .build(); + private static final MethodDescriptor< + ListAnnotationSpecSetsRequest, ListAnnotationSpecSetsResponse> + listAnnotationSpecSetsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/ListAnnotationSpecSets") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAnnotationSpecSetsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAnnotationSpecSetsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deleteAnnotationSpecSetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteAnnotationSpecSet") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAnnotationSpecSetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + createInstructionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/CreateInstruction") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateInstructionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getInstructionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/GetInstruction") + .setRequestMarshaller( + ProtoUtils.marshaller(GetInstructionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Instruction.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listInstructionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/ListInstructions") + .setRequestMarshaller( + ProtoUtils.marshaller(ListInstructionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListInstructionsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deleteInstructionMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteInstruction") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteInstructionRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deleteAnnotatedDatasetMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.datalabeling.v1beta1.DataLabelingService/DeleteAnnotatedDataset") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteAnnotatedDatasetRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + + private final UnaryCallable createDatasetCallable; + private final UnaryCallable getDatasetCallable; + private final UnaryCallable listDatasetsCallable; + private final UnaryCallable + listDatasetsPagedCallable; + private final UnaryCallable deleteDatasetCallable; + private final UnaryCallable importDataCallable; + private final OperationCallable< + ImportDataRequest, ImportDataOperationResponse, ImportDataOperationMetadata> + importDataOperationCallable; + private final UnaryCallable exportDataCallable; + private final OperationCallable< + ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata> + exportDataOperationCallable; + private final UnaryCallable getDataItemCallable; + private final UnaryCallable listDataItemsCallable; + private final UnaryCallable + listDataItemsPagedCallable; + private final UnaryCallable + getAnnotatedDatasetCallable; + private final UnaryCallable + listAnnotatedDatasetsCallable; + private final UnaryCallable + listAnnotatedDatasetsPagedCallable; + private final UnaryCallable labelImageCallable; + private final OperationCallable + labelImageOperationCallable; + private final UnaryCallable labelVideoCallable; + private final OperationCallable + labelVideoOperationCallable; + private final UnaryCallable labelTextCallable; + private final OperationCallable + labelTextOperationCallable; + private final UnaryCallable labelAudioCallable; + private final OperationCallable + labelAudioOperationCallable; + private final UnaryCallable getExampleCallable; + private final UnaryCallable listExamplesCallable; + private final UnaryCallable + listExamplesPagedCallable; + private final UnaryCallable + createAnnotationSpecSetCallable; + private final UnaryCallable + getAnnotationSpecSetCallable; + private final UnaryCallable + listAnnotationSpecSetsCallable; + private final UnaryCallable + listAnnotationSpecSetsPagedCallable; + private final UnaryCallable + deleteAnnotationSpecSetCallable; + private final UnaryCallable createInstructionCallable; + private final OperationCallable + createInstructionOperationCallable; + private final UnaryCallable getInstructionCallable; + private final UnaryCallable + listInstructionsCallable; + private final UnaryCallable + listInstructionsPagedCallable; + private final UnaryCallable deleteInstructionCallable; + private final UnaryCallable deleteAnnotatedDatasetCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataLabelingServiceStub create(DataLabelingServiceStubSettings settings) + throws IOException { + return new GrpcDataLabelingServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataLabelingServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataLabelingServiceStub( + DataLabelingServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataLabelingServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataLabelingServiceStub( + DataLabelingServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataLabelingServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcDataLabelingServiceStub( + DataLabelingServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDataLabelingServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataLabelingServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcDataLabelingServiceStub( + DataLabelingServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listDatasetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDatasetsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDatasetsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings importDataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(importDataMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ImportDataRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings exportDataTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportDataMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExportDataRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getDataItemTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataItemMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetDataItemRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listDataItemsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDataItemsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDataItemsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getAnnotatedDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAnnotatedDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetAnnotatedDatasetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listAnnotatedDatasetsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAnnotatedDatasetsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListAnnotatedDatasetsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings labelImageTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(labelImageMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(LabelImageRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings labelVideoTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(labelVideoMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(LabelVideoRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings labelTextTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(labelTextMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(LabelTextRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings labelAudioTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(labelAudioMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(LabelAudioRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getExampleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getExampleMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetExampleRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listExamplesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listExamplesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListExamplesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createAnnotationSpecSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAnnotationSpecSetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateAnnotationSpecSetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getAnnotationSpecSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAnnotationSpecSetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetAnnotationSpecSetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listAnnotationSpecSetsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAnnotationSpecSetsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListAnnotationSpecSetsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + deleteAnnotationSpecSetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAnnotationSpecSetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteAnnotationSpecSetRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createInstructionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createInstructionMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateInstructionRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getInstructionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getInstructionMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetInstructionRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listInstructionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listInstructionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListInstructionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteInstructionTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteInstructionMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteInstructionRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteAnnotatedDatasetTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAnnotatedDatasetMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteAnnotatedDatasetRequest 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.getDatasetCallable = + callableFactory.createUnaryCallable( + getDatasetTransportSettings, settings.getDatasetSettings(), clientContext); + this.listDatasetsCallable = + callableFactory.createUnaryCallable( + listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); + this.listDatasetsPagedCallable = + callableFactory.createPagedCallable( + listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); + this.deleteDatasetCallable = + callableFactory.createUnaryCallable( + deleteDatasetTransportSettings, settings.deleteDatasetSettings(), clientContext); + this.importDataCallable = + callableFactory.createUnaryCallable( + importDataTransportSettings, settings.importDataSettings(), clientContext); + this.importDataOperationCallable = + callableFactory.createOperationCallable( + importDataTransportSettings, + settings.importDataOperationSettings(), + clientContext, + this.operationsStub); + this.exportDataCallable = + callableFactory.createUnaryCallable( + exportDataTransportSettings, settings.exportDataSettings(), clientContext); + this.exportDataOperationCallable = + callableFactory.createOperationCallable( + exportDataTransportSettings, + settings.exportDataOperationSettings(), + clientContext, + this.operationsStub); + this.getDataItemCallable = + callableFactory.createUnaryCallable( + getDataItemTransportSettings, settings.getDataItemSettings(), clientContext); + this.listDataItemsCallable = + callableFactory.createUnaryCallable( + listDataItemsTransportSettings, settings.listDataItemsSettings(), clientContext); + this.listDataItemsPagedCallable = + callableFactory.createPagedCallable( + listDataItemsTransportSettings, settings.listDataItemsSettings(), clientContext); + this.getAnnotatedDatasetCallable = + callableFactory.createUnaryCallable( + getAnnotatedDatasetTransportSettings, + settings.getAnnotatedDatasetSettings(), + clientContext); + this.listAnnotatedDatasetsCallable = + callableFactory.createUnaryCallable( + listAnnotatedDatasetsTransportSettings, + settings.listAnnotatedDatasetsSettings(), + clientContext); + this.listAnnotatedDatasetsPagedCallable = + callableFactory.createPagedCallable( + listAnnotatedDatasetsTransportSettings, + settings.listAnnotatedDatasetsSettings(), + clientContext); + this.labelImageCallable = + callableFactory.createUnaryCallable( + labelImageTransportSettings, settings.labelImageSettings(), clientContext); + this.labelImageOperationCallable = + callableFactory.createOperationCallable( + labelImageTransportSettings, + settings.labelImageOperationSettings(), + clientContext, + this.operationsStub); + this.labelVideoCallable = + callableFactory.createUnaryCallable( + labelVideoTransportSettings, settings.labelVideoSettings(), clientContext); + this.labelVideoOperationCallable = + callableFactory.createOperationCallable( + labelVideoTransportSettings, + settings.labelVideoOperationSettings(), + clientContext, + this.operationsStub); + this.labelTextCallable = + callableFactory.createUnaryCallable( + labelTextTransportSettings, settings.labelTextSettings(), clientContext); + this.labelTextOperationCallable = + callableFactory.createOperationCallable( + labelTextTransportSettings, + settings.labelTextOperationSettings(), + clientContext, + this.operationsStub); + this.labelAudioCallable = + callableFactory.createUnaryCallable( + labelAudioTransportSettings, settings.labelAudioSettings(), clientContext); + this.labelAudioOperationCallable = + callableFactory.createOperationCallable( + labelAudioTransportSettings, + settings.labelAudioOperationSettings(), + clientContext, + this.operationsStub); + this.getExampleCallable = + callableFactory.createUnaryCallable( + getExampleTransportSettings, settings.getExampleSettings(), clientContext); + this.listExamplesCallable = + callableFactory.createUnaryCallable( + listExamplesTransportSettings, settings.listExamplesSettings(), clientContext); + this.listExamplesPagedCallable = + callableFactory.createPagedCallable( + listExamplesTransportSettings, settings.listExamplesSettings(), clientContext); + this.createAnnotationSpecSetCallable = + callableFactory.createUnaryCallable( + createAnnotationSpecSetTransportSettings, + settings.createAnnotationSpecSetSettings(), + clientContext); + this.getAnnotationSpecSetCallable = + callableFactory.createUnaryCallable( + getAnnotationSpecSetTransportSettings, + settings.getAnnotationSpecSetSettings(), + clientContext); + this.listAnnotationSpecSetsCallable = + callableFactory.createUnaryCallable( + listAnnotationSpecSetsTransportSettings, + settings.listAnnotationSpecSetsSettings(), + clientContext); + this.listAnnotationSpecSetsPagedCallable = + callableFactory.createPagedCallable( + listAnnotationSpecSetsTransportSettings, + settings.listAnnotationSpecSetsSettings(), + clientContext); + this.deleteAnnotationSpecSetCallable = + callableFactory.createUnaryCallable( + deleteAnnotationSpecSetTransportSettings, + settings.deleteAnnotationSpecSetSettings(), + clientContext); + this.createInstructionCallable = + callableFactory.createUnaryCallable( + createInstructionTransportSettings, + settings.createInstructionSettings(), + clientContext); + this.createInstructionOperationCallable = + callableFactory.createOperationCallable( + createInstructionTransportSettings, + settings.createInstructionOperationSettings(), + clientContext, + this.operationsStub); + this.getInstructionCallable = + callableFactory.createUnaryCallable( + getInstructionTransportSettings, settings.getInstructionSettings(), clientContext); + this.listInstructionsCallable = + callableFactory.createUnaryCallable( + listInstructionsTransportSettings, settings.listInstructionsSettings(), clientContext); + this.listInstructionsPagedCallable = + callableFactory.createPagedCallable( + listInstructionsTransportSettings, settings.listInstructionsSettings(), clientContext); + this.deleteInstructionCallable = + callableFactory.createUnaryCallable( + deleteInstructionTransportSettings, + settings.deleteInstructionSettings(), + clientContext); + this.deleteAnnotatedDatasetCallable = + callableFactory.createUnaryCallable( + deleteAnnotatedDatasetTransportSettings, + settings.deleteAnnotatedDatasetSettings(), + clientContext); + + 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 createDatasetCallable() { + return createDatasetCallable; + } + + public UnaryCallable getDatasetCallable() { + return getDatasetCallable; + } + + public UnaryCallable listDatasetsPagedCallable() { + return listDatasetsPagedCallable; + } + + public UnaryCallable listDatasetsCallable() { + return listDatasetsCallable; + } + + public UnaryCallable deleteDatasetCallable() { + return deleteDatasetCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ImportDataRequest, ImportDataOperationResponse, ImportDataOperationMetadata> + importDataOperationCallable() { + return importDataOperationCallable; + } + + public UnaryCallable importDataCallable() { + return importDataCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ExportDataRequest, ExportDataOperationResponse, ExportDataOperationMetadata> + exportDataOperationCallable() { + return exportDataOperationCallable; + } + + public UnaryCallable exportDataCallable() { + return exportDataCallable; + } + + public UnaryCallable getDataItemCallable() { + return getDataItemCallable; + } + + public UnaryCallable + listDataItemsPagedCallable() { + return listDataItemsPagedCallable; + } + + public UnaryCallable listDataItemsCallable() { + return listDataItemsCallable; + } + + public UnaryCallable getAnnotatedDatasetCallable() { + return getAnnotatedDatasetCallable; + } + + public UnaryCallable + listAnnotatedDatasetsPagedCallable() { + return listAnnotatedDatasetsPagedCallable; + } + + public UnaryCallable + listAnnotatedDatasetsCallable() { + return listAnnotatedDatasetsCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + labelImageOperationCallable() { + return labelImageOperationCallable; + } + + public UnaryCallable labelImageCallable() { + return labelImageCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + labelVideoOperationCallable() { + return labelVideoOperationCallable; + } + + public UnaryCallable labelVideoCallable() { + return labelVideoCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + labelTextOperationCallable() { + return labelTextOperationCallable; + } + + public UnaryCallable labelTextCallable() { + return labelTextCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + labelAudioOperationCallable() { + return labelAudioOperationCallable; + } + + public UnaryCallable labelAudioCallable() { + return labelAudioCallable; + } + + public UnaryCallable getExampleCallable() { + return getExampleCallable; + } + + public UnaryCallable listExamplesPagedCallable() { + return listExamplesPagedCallable; + } + + public UnaryCallable listExamplesCallable() { + return listExamplesCallable; + } + + public UnaryCallable + createAnnotationSpecSetCallable() { + return createAnnotationSpecSetCallable; + } + + public UnaryCallable + getAnnotationSpecSetCallable() { + return getAnnotationSpecSetCallable; + } + + public UnaryCallable + listAnnotationSpecSetsPagedCallable() { + return listAnnotationSpecSetsPagedCallable; + } + + public UnaryCallable + listAnnotationSpecSetsCallable() { + return listAnnotationSpecSetsCallable; + } + + public UnaryCallable deleteAnnotationSpecSetCallable() { + return deleteAnnotationSpecSetCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable + createInstructionOperationCallable() { + return createInstructionOperationCallable; + } + + public UnaryCallable createInstructionCallable() { + return createInstructionCallable; + } + + public UnaryCallable getInstructionCallable() { + return getInstructionCallable; + } + + public UnaryCallable + listInstructionsPagedCallable() { + return listInstructionsPagedCallable; + } + + public UnaryCallable + listInstructionsCallable() { + return listInstructionsCallable; + } + + public UnaryCallable deleteInstructionCallable() { + return deleteInstructionCallable; + } + + public UnaryCallable deleteAnnotatedDatasetCallable() { + return deleteAnnotatedDatasetCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-clients/google-cloud-datalabeling/src/test/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClientTest.java b/google-cloud-clients/google-cloud-datalabeling/src/test/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClientTest.java new file mode 100644 index 000000000000..f476615d0b96 --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/src/test/java/com/google/cloud/datalabeling/v1beta1/DataLabelingServiceClientTest.java @@ -0,0 +1,1349 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.datalabeling.v1beta1; + +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotatedDatasetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListAnnotationSpecSetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListDataItemsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListDatasetsPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListExamplesPagedResponse; +import static com.google.cloud.datalabeling.v1beta1.DataLabelingServiceClient.ListInstructionsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +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.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ExecutionException; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class DataLabelingServiceClientTest { + private static MockDataLabelingService mockDataLabelingService; + private static MockServiceHelper serviceHelper; + private DataLabelingServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockDataLabelingService = new MockDataLabelingService(); + serviceHelper = + new MockServiceHelper( + "in-process-1", Arrays.asList(mockDataLabelingService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + DataLabelingServiceSettings settings = + DataLabelingServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataLabelingServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void createDatasetTest() { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + Dataset expectedResponse = + Dataset.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + Dataset dataset = Dataset.newBuilder().build(); + + Dataset actualResponse = client.createDataset(formattedParent, dataset); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDatasetRequest actualRequest = (CreateDatasetRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(dataset, actualRequest.getDataset()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createDatasetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + Dataset dataset = Dataset.newBuilder().build(); + + client.createDataset(formattedParent, dataset); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getDatasetTest() { + String name2 = "name2-1052831874"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + Dataset expectedResponse = + Dataset.newBuilder() + .setName(name2) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + + Dataset actualResponse = client.getDataset(formattedName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDatasetRequest actualRequest = (GetDatasetRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getDatasetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + + client.getDataset(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listDatasetsTest() { + String nextPageToken = ""; + Dataset datasetsElement = Dataset.newBuilder().build(); + List datasets = Arrays.asList(datasetsElement); + ListDatasetsResponse expectedResponse = + ListDatasetsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllDatasets(datasets) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + String filter = "filter-1274492040"; + + ListDatasetsPagedResponse pagedListResponse = client.listDatasets(formattedParent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDatasetsList().get(0), resources.get(0)); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDatasetsRequest actualRequest = (ListDatasetsRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listDatasetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + String filter = "filter-1274492040"; + + client.listDatasets(formattedParent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteDatasetTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + + client.deleteDataset(formattedName); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDatasetRequest actualRequest = (DeleteDatasetRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteDatasetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + + client.deleteDataset(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void importDataTest() throws Exception { + String dataset = "dataset1443214456"; + int totalCount = 407761836; + int importCount = 1721296907; + ImportDataOperationResponse expectedResponse = + ImportDataOperationResponse.newBuilder() + .setDataset(dataset) + .setTotalCount(totalCount) + .setImportCount(importCount) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("importDataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataLabelingService.addResponse(resultOperation); + + String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + InputConfig inputConfig = InputConfig.newBuilder().build(); + + ImportDataOperationResponse actualResponse = + client.importDataAsync(formattedName, inputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ImportDataRequest actualRequest = (ImportDataRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void importDataExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + InputConfig inputConfig = InputConfig.newBuilder().build(); + + client.importDataAsync(formattedName, inputConfig).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()); + } + } + + @Test + @SuppressWarnings("all") + public void exportDataTest() throws Exception { + String dataset = "dataset1443214456"; + int totalCount = 407761836; + int exportCount = 529256252; + ExportDataOperationResponse expectedResponse = + ExportDataOperationResponse.newBuilder() + .setDataset(dataset) + .setTotalCount(totalCount) + .setExportCount(exportCount) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportDataTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataLabelingService.addResponse(resultOperation); + + String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + String annotatedDataset = "annotatedDataset-1407812655"; + String filter = "filter-1274492040"; + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + + ExportDataOperationResponse actualResponse = + client.exportDataAsync(formattedName, annotatedDataset, filter, outputConfig).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportDataRequest actualRequest = (ExportDataRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertEquals(annotatedDataset, actualRequest.getAnnotatedDataset()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void exportDataExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedName = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + String annotatedDataset = "annotatedDataset-1407812655"; + String filter = "filter-1274492040"; + OutputConfig outputConfig = OutputConfig.newBuilder().build(); + + client.exportDataAsync(formattedName, annotatedDataset, filter, outputConfig).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()); + } + } + + @Test + @SuppressWarnings("all") + public void getDataItemTest() { + String name2 = "name2-1052831874"; + DataItem expectedResponse = DataItem.newBuilder().setName(name2).build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedName = + DataLabelingServiceClient.formatDataItemName("[PROJECT]", "[DATASET]", "[DATA_ITEM]"); + + DataItem actualResponse = client.getDataItem(formattedName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataItemRequest actualRequest = (GetDataItemRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getDataItemExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedName = + DataLabelingServiceClient.formatDataItemName("[PROJECT]", "[DATASET]", "[DATA_ITEM]"); + + client.getDataItem(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listDataItemsTest() { + String nextPageToken = ""; + DataItem dataItemsElement = DataItem.newBuilder().build(); + List dataItems = Arrays.asList(dataItemsElement); + ListDataItemsResponse expectedResponse = + ListDataItemsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllDataItems(dataItems) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + String filter = "filter-1274492040"; + + ListDataItemsPagedResponse pagedListResponse = client.listDataItems(formattedParent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataItemsList().get(0), resources.get(0)); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataItemsRequest actualRequest = (ListDataItemsRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listDataItemsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = + DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + String filter = "filter-1274492040"; + + client.listDataItems(formattedParent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getAnnotatedDatasetTest() { + String name2 = "name2-1052831874"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + long exampleCount = 1517063674L; + long completedExampleCount = 612567290L; + AnnotatedDataset expectedResponse = + AnnotatedDataset.newBuilder() + .setName(name2) + .setDisplayName(displayName) + .setDescription(description) + .setExampleCount(exampleCount) + .setCompletedExampleCount(completedExampleCount) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedName = + DataLabelingServiceClient.formatAnnotatedDatasetName( + "[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]"); + + AnnotatedDataset actualResponse = client.getAnnotatedDataset(formattedName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAnnotatedDatasetRequest actualRequest = (GetAnnotatedDatasetRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getAnnotatedDatasetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedName = + DataLabelingServiceClient.formatAnnotatedDatasetName( + "[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]"); + + client.getAnnotatedDataset(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listAnnotatedDatasetsTest() { + String nextPageToken = ""; + AnnotatedDataset annotatedDatasetsElement = AnnotatedDataset.newBuilder().build(); + List annotatedDatasets = Arrays.asList(annotatedDatasetsElement); + ListAnnotatedDatasetsResponse expectedResponse = + ListAnnotatedDatasetsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllAnnotatedDatasets(annotatedDatasets) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + String filter = "filter-1274492040"; + + ListAnnotatedDatasetsPagedResponse pagedListResponse = + client.listAnnotatedDatasets(formattedParent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnnotatedDatasetsList().get(0), resources.get(0)); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAnnotatedDatasetsRequest actualRequest = + (ListAnnotatedDatasetsRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listAnnotatedDatasetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = + DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + String filter = "filter-1274492040"; + + client.listAnnotatedDatasets(formattedParent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void labelImageTest() throws Exception { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + long exampleCount = 1517063674L; + long completedExampleCount = 612567290L; + AnnotatedDataset expectedResponse = + AnnotatedDataset.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDescription(description) + .setExampleCount(exampleCount) + .setCompletedExampleCount(completedExampleCount) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("labelImageTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataLabelingService.addResponse(resultOperation); + + String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build(); + LabelImageRequest.Feature feature = LabelImageRequest.Feature.FEATURE_UNSPECIFIED; + + AnnotatedDataset actualResponse = + client.labelImageAsync(formattedParent, basicConfig, feature).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + LabelImageRequest actualRequest = (LabelImageRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(basicConfig, actualRequest.getBasicConfig()); + Assert.assertEquals(feature, actualRequest.getFeature()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void labelImageExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = + DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build(); + LabelImageRequest.Feature feature = LabelImageRequest.Feature.FEATURE_UNSPECIFIED; + + client.labelImageAsync(formattedParent, basicConfig, feature).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()); + } + } + + @Test + @SuppressWarnings("all") + public void labelVideoTest() throws Exception { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + long exampleCount = 1517063674L; + long completedExampleCount = 612567290L; + AnnotatedDataset expectedResponse = + AnnotatedDataset.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDescription(description) + .setExampleCount(exampleCount) + .setCompletedExampleCount(completedExampleCount) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("labelVideoTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataLabelingService.addResponse(resultOperation); + + String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build(); + LabelVideoRequest.Feature feature = LabelVideoRequest.Feature.FEATURE_UNSPECIFIED; + + AnnotatedDataset actualResponse = + client.labelVideoAsync(formattedParent, basicConfig, feature).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + LabelVideoRequest actualRequest = (LabelVideoRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(basicConfig, actualRequest.getBasicConfig()); + Assert.assertEquals(feature, actualRequest.getFeature()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void labelVideoExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = + DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build(); + LabelVideoRequest.Feature feature = LabelVideoRequest.Feature.FEATURE_UNSPECIFIED; + + client.labelVideoAsync(formattedParent, basicConfig, feature).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()); + } + } + + @Test + @SuppressWarnings("all") + public void labelTextTest() throws Exception { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + long exampleCount = 1517063674L; + long completedExampleCount = 612567290L; + AnnotatedDataset expectedResponse = + AnnotatedDataset.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDescription(description) + .setExampleCount(exampleCount) + .setCompletedExampleCount(completedExampleCount) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("labelTextTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataLabelingService.addResponse(resultOperation); + + String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build(); + LabelTextRequest.Feature feature = LabelTextRequest.Feature.FEATURE_UNSPECIFIED; + + AnnotatedDataset actualResponse = + client.labelTextAsync(formattedParent, basicConfig, feature).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + LabelTextRequest actualRequest = (LabelTextRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(basicConfig, actualRequest.getBasicConfig()); + Assert.assertEquals(feature, actualRequest.getFeature()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void labelTextExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = + DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build(); + LabelTextRequest.Feature feature = LabelTextRequest.Feature.FEATURE_UNSPECIFIED; + + client.labelTextAsync(formattedParent, basicConfig, feature).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()); + } + } + + @Test + @SuppressWarnings("all") + public void labelAudioTest() throws Exception { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + long exampleCount = 1517063674L; + long completedExampleCount = 612567290L; + AnnotatedDataset expectedResponse = + AnnotatedDataset.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDescription(description) + .setExampleCount(exampleCount) + .setCompletedExampleCount(completedExampleCount) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("labelAudioTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataLabelingService.addResponse(resultOperation); + + String formattedParent = DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build(); + LabelAudioRequest.Feature feature = LabelAudioRequest.Feature.FEATURE_UNSPECIFIED; + + AnnotatedDataset actualResponse = + client.labelAudioAsync(formattedParent, basicConfig, feature).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + LabelAudioRequest actualRequest = (LabelAudioRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(basicConfig, actualRequest.getBasicConfig()); + Assert.assertEquals(feature, actualRequest.getFeature()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void labelAudioExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = + DataLabelingServiceClient.formatDatasetName("[PROJECT]", "[DATASET]"); + HumanAnnotationConfig basicConfig = HumanAnnotationConfig.newBuilder().build(); + LabelAudioRequest.Feature feature = LabelAudioRequest.Feature.FEATURE_UNSPECIFIED; + + client.labelAudioAsync(formattedParent, basicConfig, feature).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()); + } + } + + @Test + @SuppressWarnings("all") + public void getExampleTest() { + String name2 = "name2-1052831874"; + Example expectedResponse = Example.newBuilder().setName(name2).build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedName = + DataLabelingServiceClient.formatExampleName( + "[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]", "[EXAMPLE]"); + String filter = "filter-1274492040"; + + Example actualResponse = client.getExample(formattedName, filter); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetExampleRequest actualRequest = (GetExampleRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getExampleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedName = + DataLabelingServiceClient.formatExampleName( + "[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]", "[EXAMPLE]"); + String filter = "filter-1274492040"; + + client.getExample(formattedName, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listExamplesTest() { + String nextPageToken = ""; + Example examplesElement = Example.newBuilder().build(); + List examples = Arrays.asList(examplesElement); + ListExamplesResponse expectedResponse = + ListExamplesResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllExamples(examples) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedParent = + DataLabelingServiceClient.formatAnnotatedDatasetName( + "[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]"); + String filter = "filter-1274492040"; + + ListExamplesPagedResponse pagedListResponse = client.listExamples(formattedParent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getExamplesList().get(0), resources.get(0)); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListExamplesRequest actualRequest = (ListExamplesRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listExamplesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = + DataLabelingServiceClient.formatAnnotatedDatasetName( + "[PROJECT]", "[DATASET]", "[ANNOTATED_DATASET]"); + String filter = "filter-1274492040"; + + client.listExamples(formattedParent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createAnnotationSpecSetTest() { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + AnnotationSpecSet expectedResponse = + AnnotationSpecSet.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + AnnotationSpecSet annotationSpecSet = AnnotationSpecSet.newBuilder().build(); + + AnnotationSpecSet actualResponse = + client.createAnnotationSpecSet(formattedParent, annotationSpecSet); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAnnotationSpecSetRequest actualRequest = + (CreateAnnotationSpecSetRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(annotationSpecSet, actualRequest.getAnnotationSpecSet()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createAnnotationSpecSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + AnnotationSpecSet annotationSpecSet = AnnotationSpecSet.newBuilder().build(); + + client.createAnnotationSpecSet(formattedParent, annotationSpecSet); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getAnnotationSpecSetTest() { + String name2 = "name2-1052831874"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + AnnotationSpecSet expectedResponse = + AnnotationSpecSet.newBuilder() + .setName(name2) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedName = + DataLabelingServiceClient.formatAnnotationSpecSetName("[PROJECT]", "[ANNOTATION_SPEC_SET]"); + + AnnotationSpecSet actualResponse = client.getAnnotationSpecSet(formattedName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAnnotationSpecSetRequest actualRequest = (GetAnnotationSpecSetRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getAnnotationSpecSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedName = + DataLabelingServiceClient.formatAnnotationSpecSetName( + "[PROJECT]", "[ANNOTATION_SPEC_SET]"); + + client.getAnnotationSpecSet(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listAnnotationSpecSetsTest() { + String nextPageToken = ""; + AnnotationSpecSet annotationSpecSetsElement = AnnotationSpecSet.newBuilder().build(); + List annotationSpecSets = Arrays.asList(annotationSpecSetsElement); + ListAnnotationSpecSetsResponse expectedResponse = + ListAnnotationSpecSetsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllAnnotationSpecSets(annotationSpecSets) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + String filter = "filter-1274492040"; + + ListAnnotationSpecSetsPagedResponse pagedListResponse = + client.listAnnotationSpecSets(formattedParent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnnotationSpecSetsList().get(0), resources.get(0)); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAnnotationSpecSetsRequest actualRequest = + (ListAnnotationSpecSetsRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listAnnotationSpecSetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + String filter = "filter-1274492040"; + + client.listAnnotationSpecSets(formattedParent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteAnnotationSpecSetTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedName = + DataLabelingServiceClient.formatAnnotationSpecSetName("[PROJECT]", "[ANNOTATION_SPEC_SET]"); + + client.deleteAnnotationSpecSet(formattedName); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteAnnotationSpecSetRequest actualRequest = + (DeleteAnnotationSpecSetRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteAnnotationSpecSetExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedName = + DataLabelingServiceClient.formatAnnotationSpecSetName( + "[PROJECT]", "[ANNOTATION_SPEC_SET]"); + + client.deleteAnnotationSpecSet(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createInstructionTest() throws Exception { + String name = "name3373707"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + Instruction expectedResponse = + Instruction.newBuilder() + .setName(name) + .setDisplayName(displayName) + .setDescription(description) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createInstructionTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataLabelingService.addResponse(resultOperation); + + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + Instruction instruction = Instruction.newBuilder().build(); + + Instruction actualResponse = client.createInstructionAsync(formattedParent, instruction).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateInstructionRequest actualRequest = (CreateInstructionRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(instruction, actualRequest.getInstruction()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createInstructionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + Instruction instruction = Instruction.newBuilder().build(); + + client.createInstructionAsync(formattedParent, instruction).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()); + } + } + + @Test + @SuppressWarnings("all") + public void getInstructionTest() { + String name2 = "name2-1052831874"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + Instruction expectedResponse = + Instruction.newBuilder() + .setName(name2) + .setDisplayName(displayName) + .setDescription(description) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedName = + DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]"); + + Instruction actualResponse = client.getInstruction(formattedName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetInstructionRequest actualRequest = (GetInstructionRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getInstructionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedName = + DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]"); + + client.getInstruction(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listInstructionsTest() { + String nextPageToken = ""; + Instruction instructionsElement = Instruction.newBuilder().build(); + List instructions = Arrays.asList(instructionsElement); + ListInstructionsResponse expectedResponse = + ListInstructionsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllInstructions(instructions) + .build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + String filter = "filter-1274492040"; + + ListInstructionsPagedResponse pagedListResponse = + client.listInstructions(formattedParent, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getInstructionsList().get(0), resources.get(0)); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListInstructionsRequest actualRequest = (ListInstructionsRequest) actualRequests.get(0); + + Assert.assertEquals(formattedParent, actualRequest.getParent()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listInstructionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedParent = DataLabelingServiceClient.formatProjectName("[PROJECT]"); + String filter = "filter-1274492040"; + + client.listInstructions(formattedParent, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteInstructionTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataLabelingService.addResponse(expectedResponse); + + String formattedName = + DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]"); + + client.deleteInstruction(formattedName); + + List actualRequests = mockDataLabelingService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteInstructionRequest actualRequest = (DeleteInstructionRequest) actualRequests.get(0); + + Assert.assertEquals(formattedName, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteInstructionExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataLabelingService.addException(exception); + + try { + String formattedName = + DataLabelingServiceClient.formatInstructionName("[PROJECT]", "[INSTRUCTION]"); + + client.deleteInstruction(formattedName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-clients/google-cloud-datalabeling/src/test/java/com/google/cloud/datalabeling/v1beta1/MockDataLabelingService.java b/google-cloud-clients/google-cloud-datalabeling/src/test/java/com/google/cloud/datalabeling/v1beta1/MockDataLabelingService.java new file mode 100644 index 000000000000..cfec03434071 --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/src/test/java/com/google/cloud/datalabeling/v1beta1/MockDataLabelingService.java @@ -0,0 +1,57 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.datalabeling.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockDataLabelingService implements MockGrpcService { + private final MockDataLabelingServiceImpl serviceImpl; + + public MockDataLabelingService() { + serviceImpl = new MockDataLabelingServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-clients/google-cloud-datalabeling/src/test/java/com/google/cloud/datalabeling/v1beta1/MockDataLabelingServiceImpl.java b/google-cloud-clients/google-cloud-datalabeling/src/test/java/com/google/cloud/datalabeling/v1beta1/MockDataLabelingServiceImpl.java new file mode 100644 index 000000000000..b17860ecc6fe --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/src/test/java/com/google/cloud/datalabeling/v1beta1/MockDataLabelingServiceImpl.java @@ -0,0 +1,427 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.datalabeling.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.datalabeling.v1beta1.DataLabelingServiceGrpc.DataLabelingServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockDataLabelingServiceImpl extends DataLabelingServiceImplBase { + private List requests; + private Queue responses; + + public MockDataLabelingServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void createDataset( + CreateDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Dataset) { + requests.add(request); + responseObserver.onNext((Dataset) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getDataset(GetDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Dataset) { + requests.add(request); + responseObserver.onNext((Dataset) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listDatasets( + ListDatasetsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListDatasetsResponse) { + requests.add(request); + responseObserver.onNext((ListDatasetsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteDataset(DeleteDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void importData(ImportDataRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void exportData(ExportDataRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getDataItem(GetDataItemRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof DataItem) { + requests.add(request); + responseObserver.onNext((DataItem) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listDataItems( + ListDataItemsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListDataItemsResponse) { + requests.add(request); + responseObserver.onNext((ListDataItemsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getAnnotatedDataset( + GetAnnotatedDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof AnnotatedDataset) { + requests.add(request); + responseObserver.onNext((AnnotatedDataset) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listAnnotatedDatasets( + ListAnnotatedDatasetsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListAnnotatedDatasetsResponse) { + requests.add(request); + responseObserver.onNext((ListAnnotatedDatasetsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteAnnotatedDataset( + DeleteAnnotatedDatasetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void labelImage(LabelImageRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void labelVideo(LabelVideoRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void labelText(LabelTextRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void labelAudio(LabelAudioRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getExample(GetExampleRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Example) { + requests.add(request); + responseObserver.onNext((Example) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listExamples( + ListExamplesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListExamplesResponse) { + requests.add(request); + responseObserver.onNext((ListExamplesResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createAnnotationSpecSet( + CreateAnnotationSpecSetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof AnnotationSpecSet) { + requests.add(request); + responseObserver.onNext((AnnotationSpecSet) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getAnnotationSpecSet( + GetAnnotationSpecSetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof AnnotationSpecSet) { + requests.add(request); + responseObserver.onNext((AnnotationSpecSet) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listAnnotationSpecSets( + ListAnnotationSpecSetsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListAnnotationSpecSetsResponse) { + requests.add(request); + responseObserver.onNext((ListAnnotationSpecSetsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteAnnotationSpecSet( + DeleteAnnotationSpecSetRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createInstruction( + CreateInstructionRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getInstruction( + GetInstructionRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Instruction) { + requests.add(request); + responseObserver.onNext((Instruction) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listInstructions( + ListInstructionsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListInstructionsResponse) { + requests.add(request); + responseObserver.onNext((ListInstructionsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteInstruction( + DeleteInstructionRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-clients/google-cloud-datalabeling/synth.py b/google-cloud-clients/google-cloud-datalabeling/synth.py new file mode 100644 index 000000000000..0db6d3ee36f9 --- /dev/null +++ b/google-cloud-clients/google-cloud-datalabeling/synth.py @@ -0,0 +1,40 @@ +# 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. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import synthtool.languages.java as java + +gapic = gcp.GAPICGenerator() + +service = 'datalabeling' +versions = [ 'v1beta1'] +config_pattern = '/google/cloud/datalabeling/artman_datalabeling_{version}.yaml' + +for version in versions: + library = gapic.java_library( + service=service, + version=version, + config_path=config_pattern.format(version=version), + artman_output_name='') + + s.copy(library / f'gapic-google-cloud-{service}-{version}/src', 'src') + s.copy(library / f'grpc-google-cloud-{service}-{version}/src', f'../../google-api-grpc/grpc-google-cloud-{service}-{version}/src') + s.copy(library / f'proto-google-cloud-{service}-{version}/src', f'../../google-api-grpc/proto-google-cloud-{service}-{version}/src') + + java.format_code('./src') + java.format_code(f'../../google-api-grpc/grpc-google-cloud-{service}-{version}/src') + java.format_code(f'../../google-api-grpc/proto-google-cloud-{service}-{version}/src') diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml index 9d1da7430352..0169be6ba120 100644 --- a/google-cloud-clients/pom.xml +++ b/google-cloud-clients/pom.xml @@ -431,6 +431,7 @@ google-cloud-core-http google-cloud-core-grpc google-cloud-dataproc + google-cloud-datalabeling google-cloud-datastore google-cloud-dlp google-cloud-dialogflow diff --git a/versions.txt b/versions.txt index d7089013a2e0..f9ba60b90ba5 100644 --- a/versions.txt +++ b/versions.txt @@ -24,6 +24,7 @@ google-cloud-contrib:0.85.0-alpha:0.85.1-alpha-SNAPSHOT google-cloud-core:1.67.0:1.67.1-SNAPSHOT google-cloud-core-grpc:1.67.0:1.67.1-SNAPSHOT google-cloud-core-http:1.67.0:1.67.1-SNAPSHOT +google-cloud-datalabeling:0.85.0-alpha:0.85.1-alpha-SNAPSHOT google-cloud-dataproc:0.85.0-alpha:0.85.1-alpha-SNAPSHOT google-cloud-datastore:1.67.0:1.67.1-SNAPSHOT google-cloud-dialogflow:0.85.0-alpha:0.85.1-alpha-SNAPSHOT @@ -72,6 +73,7 @@ grpc-google-cloud-bigtable-admin-v2:0.50.0:0.50.1-SNAPSHOT grpc-google-cloud-bigtable-v2:0.50.0:0.50.1-SNAPSHOT grpc-google-cloud-container-v1:0.50.0:0.50.1-SNAPSHOT grpc-google-cloud-containeranalysis-v1beta1:0.50.0:0.50.1-SNAPSHOT +grpc-google-cloud-datalabeling-v1beta1:0.50.0:0.50.1-SNAPSHOT grpc-google-cloud-dataproc-v1:0.50.0:0.50.1-SNAPSHOT grpc-google-cloud-dataproc-v1beta2:0.50.0:0.50.1-SNAPSHOT grpc-google-cloud-dialogflow-v2:0.50.0:0.50.1-SNAPSHOT @@ -130,6 +132,7 @@ proto-google-cloud-bigtable-admin-v2:0.50.0:0.50.1-SNAPSHOT proto-google-cloud-bigtable-v2:0.50.0:0.50.1-SNAPSHOT proto-google-cloud-container-v1:0.50.0:0.50.1-SNAPSHOT proto-google-cloud-containeranalysis-v1beta1:0.50.0:0.50.1-SNAPSHOT +proto-google-cloud-datalabeling-v1beta1:0.50.0:0.50.1-SNAPSHOT proto-google-cloud-dataproc-v1:0.50.0:0.50.1-SNAPSHOT proto-google-cloud-dataproc-v1beta2:0.50.0:0.50.1-SNAPSHOT proto-google-cloud-datastore-v1:0.50.0:0.50.1-SNAPSHOT