+ 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 extends com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>
+ 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 extends com.google.cloud.datalabeling.v1beta1.AnnotationSpec> 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 extends com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>
+ 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 extends com.google.cloud.datalabeling.v1beta1.AnnotationSpecOrBuilder>
+ 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 extends com.google.cloud.datalabeling.v1beta1.VertexOrBuilder>
+ 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 extends com.google.cloud.datalabeling.v1beta1.Vertex> 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 extends com.google.cloud.datalabeling.v1beta1.VertexOrBuilder>
+ 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 extends com.google.cloud.datalabeling.v1beta1.VertexOrBuilder>
+ 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 extends com.google.rpc.StatusOrBuilder>
+ 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 extends com.google.rpc.Status> 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 extends com.google.rpc.StatusOrBuilder>
+ 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 extends com.google.rpc.StatusOrBuilder> 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