From 02ce311e8f23f0564bdc5509f2cab92ec7248f3b Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Wed, 29 Jan 2020 04:17:02 -0800 Subject: [PATCH] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- protos/protos.d.ts | 2368 +++--- protos/protos.js | 6502 ++++++++--------- protos/protos.json | 130 +- .../data_labeling_service_proto_list.json | 2 +- synth.metadata | 130 +- 5 files changed, 4628 insertions(+), 4504 deletions(-) diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 3aa780f..d9776c8 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -26,2834 +26,2834 @@ export namespace google { /** Namespace v1beta1. */ namespace v1beta1 { - /** Properties of an AnnotationSpecSet. */ - interface IAnnotationSpecSet { - - /** AnnotationSpecSet name */ - name?: (string|null); + /** Properties of an ImagePayload. */ + interface IImagePayload { - /** AnnotationSpecSet displayName */ - displayName?: (string|null); + /** ImagePayload mimeType */ + mimeType?: (string|null); - /** AnnotationSpecSet description */ - description?: (string|null); + /** ImagePayload imageThumbnail */ + imageThumbnail?: (Uint8Array|string|null); - /** AnnotationSpecSet annotationSpecs */ - annotationSpecs?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec[]|null); + /** ImagePayload imageUri */ + imageUri?: (string|null); - /** AnnotationSpecSet blockingResources */ - blockingResources?: (string[]|null); + /** ImagePayload signedUri */ + signedUri?: (string|null); } - /** Represents an AnnotationSpecSet. */ - class AnnotationSpecSet implements IAnnotationSpecSet { + /** Represents an ImagePayload. */ + class ImagePayload implements IImagePayload { /** - * Constructs a new AnnotationSpecSet. + * Constructs a new ImagePayload. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IAnnotationSpecSet); - - /** AnnotationSpecSet name. */ - public name: string; + constructor(properties?: google.cloud.datalabeling.v1beta1.IImagePayload); - /** AnnotationSpecSet displayName. */ - public displayName: string; + /** ImagePayload mimeType. */ + public mimeType: string; - /** AnnotationSpecSet description. */ - public description: string; + /** ImagePayload imageThumbnail. */ + public imageThumbnail: (Uint8Array|string); - /** AnnotationSpecSet annotationSpecs. */ - public annotationSpecs: google.cloud.datalabeling.v1beta1.IAnnotationSpec[]; + /** ImagePayload imageUri. */ + public imageUri: string; - /** AnnotationSpecSet blockingResources. */ - public blockingResources: string[]; + /** ImagePayload signedUri. */ + public signedUri: string; /** - * Creates a new AnnotationSpecSet instance using the specified properties. + * Creates a new ImagePayload instance using the specified properties. * @param [properties] Properties to set - * @returns AnnotationSpecSet instance + * @returns ImagePayload instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IAnnotationSpecSet): google.cloud.datalabeling.v1beta1.AnnotationSpecSet; + public static create(properties?: google.cloud.datalabeling.v1beta1.IImagePayload): google.cloud.datalabeling.v1beta1.ImagePayload; /** - * Encodes the specified AnnotationSpecSet message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpecSet.verify|verify} messages. - * @param message AnnotationSpecSet message or plain object to encode + * Encodes the specified ImagePayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePayload.verify|verify} messages. + * @param message ImagePayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IImagePayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnnotationSpecSet message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpecSet.verify|verify} messages. - * @param message AnnotationSpecSet message or plain object to encode + * Encodes the specified ImagePayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePayload.verify|verify} messages. + * @param message ImagePayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IImagePayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnnotationSpecSet message from the specified reader or buffer. + * Decodes an ImagePayload message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnnotationSpecSet + * @returns ImagePayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.AnnotationSpecSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ImagePayload; /** - * Decodes an AnnotationSpecSet message from the specified reader or buffer, length delimited. + * Decodes an ImagePayload message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnnotationSpecSet + * @returns ImagePayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.AnnotationSpecSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ImagePayload; /** - * Verifies an AnnotationSpecSet message. + * Verifies an ImagePayload message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AnnotationSpecSet message from a plain object. Also converts values to their respective internal types. + * Creates an ImagePayload message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnnotationSpecSet + * @returns ImagePayload */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.AnnotationSpecSet; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ImagePayload; /** - * Creates a plain object from an AnnotationSpecSet message. Also converts values to other types if specified. - * @param message AnnotationSpecSet + * Creates a plain object from an ImagePayload message. Also converts values to other types if specified. + * @param message ImagePayload * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.AnnotationSpecSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.ImagePayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnnotationSpecSet to JSON. + * Converts this ImagePayload to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AnnotationSpec. */ - interface IAnnotationSpec { - - /** AnnotationSpec displayName */ - displayName?: (string|null); + /** Properties of a TextPayload. */ + interface ITextPayload { - /** AnnotationSpec description */ - description?: (string|null); + /** TextPayload textContent */ + textContent?: (string|null); } - /** Represents an AnnotationSpec. */ - class AnnotationSpec implements IAnnotationSpec { + /** Represents a TextPayload. */ + class TextPayload implements ITextPayload { /** - * Constructs a new AnnotationSpec. + * Constructs a new TextPayload. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IAnnotationSpec); - - /** AnnotationSpec displayName. */ - public displayName: string; + constructor(properties?: google.cloud.datalabeling.v1beta1.ITextPayload); - /** AnnotationSpec description. */ - public description: string; + /** TextPayload textContent. */ + public textContent: string; /** - * Creates a new AnnotationSpec instance using the specified properties. + * Creates a new TextPayload instance using the specified properties. * @param [properties] Properties to set - * @returns AnnotationSpec instance + * @returns TextPayload instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IAnnotationSpec): google.cloud.datalabeling.v1beta1.AnnotationSpec; + public static create(properties?: google.cloud.datalabeling.v1beta1.ITextPayload): google.cloud.datalabeling.v1beta1.TextPayload; /** - * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpec.verify|verify} messages. - * @param message AnnotationSpec message or plain object to encode + * Encodes the specified TextPayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextPayload.verify|verify} messages. + * @param message TextPayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.ITextPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpec.verify|verify} messages. - * @param message AnnotationSpec message or plain object to encode + * Encodes the specified TextPayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextPayload.verify|verify} messages. + * @param message TextPayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.ITextPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnnotationSpec message from the specified reader or buffer. + * Decodes a TextPayload message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnnotationSpec + * @returns TextPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.AnnotationSpec; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.TextPayload; /** - * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. + * Decodes a TextPayload message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnnotationSpec + * @returns TextPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.AnnotationSpec; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.TextPayload; /** - * Verifies an AnnotationSpec message. + * Verifies a TextPayload message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AnnotationSpec message from a plain object. Also converts values to their respective internal types. + * Creates a TextPayload message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnnotationSpec + * @returns TextPayload */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.AnnotationSpec; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.TextPayload; /** - * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. - * @param message AnnotationSpec + * Creates a plain object from a TextPayload message. Also converts values to other types if specified. + * @param message TextPayload * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.AnnotationSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.TextPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnnotationSpec to JSON. + * Converts this TextPayload to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** AnnotationSource enum. */ - enum AnnotationSource { - ANNOTATION_SOURCE_UNSPECIFIED = 0, - OPERATOR = 3 - } - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation name */ - name?: (string|null); - - /** Annotation annotationSource */ - annotationSource?: (google.cloud.datalabeling.v1beta1.AnnotationSource|keyof typeof google.cloud.datalabeling.v1beta1.AnnotationSource|null); - - /** Annotation annotationValue */ - annotationValue?: (google.cloud.datalabeling.v1beta1.IAnnotationValue|null); + /** Properties of a VideoThumbnail. */ + interface IVideoThumbnail { - /** Annotation annotationMetadata */ - annotationMetadata?: (google.cloud.datalabeling.v1beta1.IAnnotationMetadata|null); + /** VideoThumbnail thumbnail */ + thumbnail?: (Uint8Array|string|null); - /** Annotation annotationSentiment */ - annotationSentiment?: (google.cloud.datalabeling.v1beta1.AnnotationSentiment|keyof typeof google.cloud.datalabeling.v1beta1.AnnotationSentiment|null); + /** VideoThumbnail timeOffset */ + timeOffset?: (google.protobuf.IDuration|null); } - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** Represents a VideoThumbnail. */ + class VideoThumbnail implements IVideoThumbnail { /** - * Constructs a new Annotation. + * Constructs a new VideoThumbnail. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IAnnotation); - - /** Annotation name. */ - public name: string; - - /** Annotation annotationSource. */ - public annotationSource: (google.cloud.datalabeling.v1beta1.AnnotationSource|keyof typeof google.cloud.datalabeling.v1beta1.AnnotationSource); - - /** Annotation annotationValue. */ - public annotationValue?: (google.cloud.datalabeling.v1beta1.IAnnotationValue|null); + constructor(properties?: google.cloud.datalabeling.v1beta1.IVideoThumbnail); - /** Annotation annotationMetadata. */ - public annotationMetadata?: (google.cloud.datalabeling.v1beta1.IAnnotationMetadata|null); + /** VideoThumbnail thumbnail. */ + public thumbnail: (Uint8Array|string); - /** Annotation annotationSentiment. */ - public annotationSentiment: (google.cloud.datalabeling.v1beta1.AnnotationSentiment|keyof typeof google.cloud.datalabeling.v1beta1.AnnotationSentiment); + /** VideoThumbnail timeOffset. */ + public timeOffset?: (google.protobuf.IDuration|null); /** - * Creates a new Annotation instance using the specified properties. + * Creates a new VideoThumbnail instance using the specified properties. * @param [properties] Properties to set - * @returns Annotation instance + * @returns VideoThumbnail instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IAnnotation): google.cloud.datalabeling.v1beta1.Annotation; + public static create(properties?: google.cloud.datalabeling.v1beta1.IVideoThumbnail): google.cloud.datalabeling.v1beta1.VideoThumbnail; /** - * Encodes the specified Annotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode + * Encodes the specified VideoThumbnail message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoThumbnail.verify|verify} messages. + * @param message VideoThumbnail message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IVideoThumbnail, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode + * Encodes the specified VideoThumbnail message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoThumbnail.verify|verify} messages. + * @param message VideoThumbnail message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVideoThumbnail, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Annotation message from the specified reader or buffer. + * Decodes a VideoThumbnail message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Annotation + * @returns VideoThumbnail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.Annotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.VideoThumbnail; /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. + * Decodes a VideoThumbnail message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Annotation + * @returns VideoThumbnail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.Annotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.VideoThumbnail; /** - * Verifies an Annotation message. + * Verifies a VideoThumbnail message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * Creates a VideoThumbnail message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Annotation + * @returns VideoThumbnail */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.Annotation; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.VideoThumbnail; /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation + * Creates a plain object from a VideoThumbnail message. Also converts values to other types if specified. + * @param message VideoThumbnail * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.VideoThumbnail, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Annotation to JSON. + * Converts this VideoThumbnail to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** AnnotationSentiment enum. */ - enum AnnotationSentiment { - ANNOTATION_SENTIMENT_UNSPECIFIED = 0, - NEGATIVE = 1, - POSITIVE = 2 - } - - /** AnnotationType enum. */ - enum AnnotationType { - ANNOTATION_TYPE_UNSPECIFIED = 0, - IMAGE_CLASSIFICATION_ANNOTATION = 1, - IMAGE_BOUNDING_BOX_ANNOTATION = 2, - IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION = 13, - IMAGE_BOUNDING_POLY_ANNOTATION = 10, - IMAGE_POLYLINE_ANNOTATION = 11, - IMAGE_SEGMENTATION_ANNOTATION = 12, - VIDEO_SHOTS_CLASSIFICATION_ANNOTATION = 3, - VIDEO_OBJECT_TRACKING_ANNOTATION = 4, - VIDEO_OBJECT_DETECTION_ANNOTATION = 5, - VIDEO_EVENT_ANNOTATION = 6, - TEXT_CLASSIFICATION_ANNOTATION = 8, - TEXT_ENTITY_EXTRACTION_ANNOTATION = 9, - GENERAL_CLASSIFICATION_ANNOTATION = 14 - } - - /** Properties of an AnnotationValue. */ - interface IAnnotationValue { - - /** AnnotationValue imageClassificationAnnotation */ - imageClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation|null); - - /** AnnotationValue imageBoundingPolyAnnotation */ - imageBoundingPolyAnnotation?: (google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation|null); - - /** AnnotationValue imagePolylineAnnotation */ - imagePolylineAnnotation?: (google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation|null); - - /** AnnotationValue imageSegmentationAnnotation */ - imageSegmentationAnnotation?: (google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation|null); + /** Properties of a VideoPayload. */ + interface IVideoPayload { - /** AnnotationValue textClassificationAnnotation */ - textClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation|null); + /** VideoPayload mimeType */ + mimeType?: (string|null); - /** AnnotationValue textEntityExtractionAnnotation */ - textEntityExtractionAnnotation?: (google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation|null); + /** VideoPayload videoUri */ + videoUri?: (string|null); - /** AnnotationValue videoClassificationAnnotation */ - videoClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation|null); + /** VideoPayload videoThumbnails */ + videoThumbnails?: (google.cloud.datalabeling.v1beta1.IVideoThumbnail[]|null); - /** AnnotationValue videoObjectTrackingAnnotation */ - videoObjectTrackingAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation|null); + /** VideoPayload frameRate */ + frameRate?: (number|null); - /** AnnotationValue videoEventAnnotation */ - videoEventAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoEventAnnotation|null); + /** VideoPayload signedUri */ + signedUri?: (string|null); } - /** Represents an AnnotationValue. */ - class AnnotationValue implements IAnnotationValue { + /** Represents a VideoPayload. */ + class VideoPayload implements IVideoPayload { /** - * Constructs a new AnnotationValue. + * Constructs a new VideoPayload. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IAnnotationValue); - - /** AnnotationValue imageClassificationAnnotation. */ - public imageClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation|null); - - /** AnnotationValue imageBoundingPolyAnnotation. */ - public imageBoundingPolyAnnotation?: (google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation|null); - - /** AnnotationValue imagePolylineAnnotation. */ - public imagePolylineAnnotation?: (google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation|null); - - /** AnnotationValue imageSegmentationAnnotation. */ - public imageSegmentationAnnotation?: (google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation|null); - - /** AnnotationValue textClassificationAnnotation. */ - public textClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation|null); + constructor(properties?: google.cloud.datalabeling.v1beta1.IVideoPayload); - /** AnnotationValue textEntityExtractionAnnotation. */ - public textEntityExtractionAnnotation?: (google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation|null); + /** VideoPayload mimeType. */ + public mimeType: string; - /** AnnotationValue videoClassificationAnnotation. */ - public videoClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation|null); + /** VideoPayload videoUri. */ + public videoUri: string; - /** AnnotationValue videoObjectTrackingAnnotation. */ - public videoObjectTrackingAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation|null); + /** VideoPayload videoThumbnails. */ + public videoThumbnails: google.cloud.datalabeling.v1beta1.IVideoThumbnail[]; - /** AnnotationValue videoEventAnnotation. */ - public videoEventAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoEventAnnotation|null); + /** VideoPayload frameRate. */ + public frameRate: number; - /** AnnotationValue valueType. */ - public valueType?: ("imageClassificationAnnotation"|"imageBoundingPolyAnnotation"|"imagePolylineAnnotation"|"imageSegmentationAnnotation"|"textClassificationAnnotation"|"textEntityExtractionAnnotation"|"videoClassificationAnnotation"|"videoObjectTrackingAnnotation"|"videoEventAnnotation"); + /** VideoPayload signedUri. */ + public signedUri: string; /** - * Creates a new AnnotationValue instance using the specified properties. + * Creates a new VideoPayload instance using the specified properties. * @param [properties] Properties to set - * @returns AnnotationValue instance + * @returns VideoPayload instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IAnnotationValue): google.cloud.datalabeling.v1beta1.AnnotationValue; + public static create(properties?: google.cloud.datalabeling.v1beta1.IVideoPayload): google.cloud.datalabeling.v1beta1.VideoPayload; /** - * Encodes the specified AnnotationValue message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationValue.verify|verify} messages. - * @param message AnnotationValue message or plain object to encode + * Encodes the specified VideoPayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoPayload.verify|verify} messages. + * @param message VideoPayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IAnnotationValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IVideoPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnnotationValue message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationValue.verify|verify} messages. - * @param message AnnotationValue message or plain object to encode + * Encodes the specified VideoPayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoPayload.verify|verify} messages. + * @param message VideoPayload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IAnnotationValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVideoPayload, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnnotationValue message from the specified reader or buffer. + * Decodes a VideoPayload message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnnotationValue + * @returns VideoPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.AnnotationValue; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.VideoPayload; /** - * Decodes an AnnotationValue message from the specified reader or buffer, length delimited. + * Decodes a VideoPayload message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnnotationValue + * @returns VideoPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.AnnotationValue; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.VideoPayload; /** - * Verifies an AnnotationValue message. + * Verifies a VideoPayload message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AnnotationValue message from a plain object. Also converts values to their respective internal types. + * Creates a VideoPayload message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnnotationValue + * @returns VideoPayload */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.AnnotationValue; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.VideoPayload; /** - * Creates a plain object from an AnnotationValue message. Also converts values to other types if specified. - * @param message AnnotationValue + * Creates a plain object from a VideoPayload message. Also converts values to other types if specified. + * @param message VideoPayload * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.AnnotationValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.VideoPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnnotationValue to JSON. + * Converts this VideoPayload to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageClassificationAnnotation. */ - interface IImageClassificationAnnotation { + /** Properties of an AnnotationSpecSet. */ + interface IAnnotationSpecSet { - /** ImageClassificationAnnotation annotationSpec */ - annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + /** AnnotationSpecSet name */ + name?: (string|null); + + /** AnnotationSpecSet displayName */ + displayName?: (string|null); + + /** AnnotationSpecSet description */ + description?: (string|null); + + /** AnnotationSpecSet annotationSpecs */ + annotationSpecs?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec[]|null); + + /** AnnotationSpecSet blockingResources */ + blockingResources?: (string[]|null); } - /** Represents an ImageClassificationAnnotation. */ - class ImageClassificationAnnotation implements IImageClassificationAnnotation { + /** Represents an AnnotationSpecSet. */ + class AnnotationSpecSet implements IAnnotationSpecSet { /** - * Constructs a new ImageClassificationAnnotation. + * Constructs a new AnnotationSpecSet. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation); + constructor(properties?: google.cloud.datalabeling.v1beta1.IAnnotationSpecSet); - /** ImageClassificationAnnotation annotationSpec. */ - public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + /** AnnotationSpecSet name. */ + public name: string; + + /** AnnotationSpecSet displayName. */ + public displayName: string; + + /** AnnotationSpecSet description. */ + public description: string; + + /** AnnotationSpecSet annotationSpecs. */ + public annotationSpecs: google.cloud.datalabeling.v1beta1.IAnnotationSpec[]; + + /** AnnotationSpecSet blockingResources. */ + public blockingResources: string[]; /** - * Creates a new ImageClassificationAnnotation instance using the specified properties. + * Creates a new AnnotationSpecSet instance using the specified properties. * @param [properties] Properties to set - * @returns ImageClassificationAnnotation instance + * @returns AnnotationSpecSet instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation): google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation; + public static create(properties?: google.cloud.datalabeling.v1beta1.IAnnotationSpecSet): google.cloud.datalabeling.v1beta1.AnnotationSpecSet; /** - * Encodes the specified ImageClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.verify|verify} messages. - * @param message ImageClassificationAnnotation message or plain object to encode + * Encodes the specified AnnotationSpecSet message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpecSet.verify|verify} messages. + * @param message AnnotationSpecSet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.verify|verify} messages. - * @param message ImageClassificationAnnotation message or plain object to encode + * Encodes the specified AnnotationSpecSet message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpecSet.verify|verify} messages. + * @param message AnnotationSpecSet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IAnnotationSpecSet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageClassificationAnnotation message from the specified reader or buffer. + * Decodes an AnnotationSpecSet message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageClassificationAnnotation + * @returns AnnotationSpecSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.AnnotationSpecSet; /** - * Decodes an ImageClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes an AnnotationSpecSet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageClassificationAnnotation + * @returns AnnotationSpecSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.AnnotationSpecSet; /** - * Verifies an ImageClassificationAnnotation message. + * Verifies an AnnotationSpecSet message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImageClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationSpecSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageClassificationAnnotation + * @returns AnnotationSpecSet */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.AnnotationSpecSet; /** - * Creates a plain object from an ImageClassificationAnnotation message. Also converts values to other types if specified. - * @param message ImageClassificationAnnotation + * Creates a plain object from an AnnotationSpecSet message. Also converts values to other types if specified. + * @param message AnnotationSpecSet * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.AnnotationSpecSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageClassificationAnnotation to JSON. + * Converts this AnnotationSpecSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Vertex. */ - interface IVertex { + /** Properties of an AnnotationSpec. */ + interface IAnnotationSpec { - /** Vertex x */ - x?: (number|null); + /** AnnotationSpec displayName */ + displayName?: (string|null); - /** Vertex y */ - y?: (number|null); + /** AnnotationSpec description */ + description?: (string|null); } - /** Represents a Vertex. */ - class Vertex implements IVertex { + /** Represents an AnnotationSpec. */ + class AnnotationSpec implements IAnnotationSpec { /** - * Constructs a new Vertex. + * Constructs a new AnnotationSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IVertex); + constructor(properties?: google.cloud.datalabeling.v1beta1.IAnnotationSpec); - /** Vertex x. */ - public x: number; + /** AnnotationSpec displayName. */ + public displayName: string; - /** Vertex y. */ - public y: number; + /** AnnotationSpec description. */ + public description: string; /** - * Creates a new Vertex instance using the specified properties. + * Creates a new AnnotationSpec instance using the specified properties. * @param [properties] Properties to set - * @returns Vertex instance + * @returns AnnotationSpec instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IVertex): google.cloud.datalabeling.v1beta1.Vertex; + public static create(properties?: google.cloud.datalabeling.v1beta1.IAnnotationSpec): google.cloud.datalabeling.v1beta1.AnnotationSpec; /** - * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Vertex.verify|verify} messages. - * @param message Vertex message or plain object to encode + * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpec.verify|verify} messages. + * @param message AnnotationSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IVertex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Vertex.verify|verify} messages. - * @param message Vertex message or plain object to encode + * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpec.verify|verify} messages. + * @param message AnnotationSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVertex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IAnnotationSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Vertex message from the specified reader or buffer. + * Decodes an AnnotationSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Vertex + * @returns AnnotationSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.Vertex; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.AnnotationSpec; /** - * Decodes a Vertex message from the specified reader or buffer, length delimited. + * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Vertex + * @returns AnnotationSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.Vertex; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.AnnotationSpec; /** - * Verifies a Vertex message. + * Verifies an AnnotationSpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Vertex message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Vertex + * @returns AnnotationSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.Vertex; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.AnnotationSpec; /** - * Creates a plain object from a Vertex message. Also converts values to other types if specified. - * @param message Vertex + * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. + * @param message AnnotationSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.Vertex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.AnnotationSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Vertex to JSON. + * Converts this AnnotationSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a NormalizedVertex. */ - interface INormalizedVertex { + /** AnnotationSource enum. */ + enum AnnotationSource { + ANNOTATION_SOURCE_UNSPECIFIED = 0, + OPERATOR = 3 + } - /** NormalizedVertex x */ - x?: (number|null); + /** Properties of an Annotation. */ + interface IAnnotation { - /** NormalizedVertex y */ - y?: (number|null); + /** Annotation name */ + name?: (string|null); + + /** Annotation annotationSource */ + annotationSource?: (google.cloud.datalabeling.v1beta1.AnnotationSource|keyof typeof google.cloud.datalabeling.v1beta1.AnnotationSource|null); + + /** Annotation annotationValue */ + annotationValue?: (google.cloud.datalabeling.v1beta1.IAnnotationValue|null); + + /** Annotation annotationMetadata */ + annotationMetadata?: (google.cloud.datalabeling.v1beta1.IAnnotationMetadata|null); + + /** Annotation annotationSentiment */ + annotationSentiment?: (google.cloud.datalabeling.v1beta1.AnnotationSentiment|keyof typeof google.cloud.datalabeling.v1beta1.AnnotationSentiment|null); } - /** Represents a NormalizedVertex. */ - class NormalizedVertex implements INormalizedVertex { + /** Represents an Annotation. */ + class Annotation implements IAnnotation { /** - * Constructs a new NormalizedVertex. + * Constructs a new Annotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.INormalizedVertex); + constructor(properties?: google.cloud.datalabeling.v1beta1.IAnnotation); - /** NormalizedVertex x. */ - public x: number; + /** Annotation name. */ + public name: string; - /** NormalizedVertex y. */ - public y: number; + /** Annotation annotationSource. */ + public annotationSource: (google.cloud.datalabeling.v1beta1.AnnotationSource|keyof typeof google.cloud.datalabeling.v1beta1.AnnotationSource); + + /** Annotation annotationValue. */ + public annotationValue?: (google.cloud.datalabeling.v1beta1.IAnnotationValue|null); + + /** Annotation annotationMetadata. */ + public annotationMetadata?: (google.cloud.datalabeling.v1beta1.IAnnotationMetadata|null); + + /** Annotation annotationSentiment. */ + public annotationSentiment: (google.cloud.datalabeling.v1beta1.AnnotationSentiment|keyof typeof google.cloud.datalabeling.v1beta1.AnnotationSentiment); /** - * Creates a new NormalizedVertex instance using the specified properties. + * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set - * @returns NormalizedVertex instance + * @returns Annotation instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.INormalizedVertex): google.cloud.datalabeling.v1beta1.NormalizedVertex; + public static create(properties?: google.cloud.datalabeling.v1beta1.IAnnotation): google.cloud.datalabeling.v1beta1.Annotation; /** - * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedVertex.verify|verify} messages. - * @param message NormalizedVertex message or plain object to encode + * Encodes the specified Annotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedVertex.verify|verify} messages. - * @param message NormalizedVertex message or plain object to encode + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NormalizedVertex message from the specified reader or buffer. + * Decodes an Annotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NormalizedVertex + * @returns Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.NormalizedVertex; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.Annotation; /** - * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NormalizedVertex + * @returns Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.NormalizedVertex; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.Annotation; /** - * Verifies a NormalizedVertex message. + * Verifies an Annotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NormalizedVertex + * @returns Annotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.NormalizedVertex; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.Annotation; /** - * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. - * @param message NormalizedVertex + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.NormalizedVertex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NormalizedVertex to JSON. + * Converts this Annotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a BoundingPoly. */ - interface IBoundingPoly { + /** AnnotationSentiment enum. */ + enum AnnotationSentiment { + ANNOTATION_SENTIMENT_UNSPECIFIED = 0, + NEGATIVE = 1, + POSITIVE = 2 + } - /** BoundingPoly vertices */ - vertices?: (google.cloud.datalabeling.v1beta1.IVertex[]|null); + /** AnnotationType enum. */ + enum AnnotationType { + ANNOTATION_TYPE_UNSPECIFIED = 0, + IMAGE_CLASSIFICATION_ANNOTATION = 1, + IMAGE_BOUNDING_BOX_ANNOTATION = 2, + IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION = 13, + IMAGE_BOUNDING_POLY_ANNOTATION = 10, + IMAGE_POLYLINE_ANNOTATION = 11, + IMAGE_SEGMENTATION_ANNOTATION = 12, + VIDEO_SHOTS_CLASSIFICATION_ANNOTATION = 3, + VIDEO_OBJECT_TRACKING_ANNOTATION = 4, + VIDEO_OBJECT_DETECTION_ANNOTATION = 5, + VIDEO_EVENT_ANNOTATION = 6, + TEXT_CLASSIFICATION_ANNOTATION = 8, + TEXT_ENTITY_EXTRACTION_ANNOTATION = 9, + GENERAL_CLASSIFICATION_ANNOTATION = 14 } - /** Represents a BoundingPoly. */ - class BoundingPoly implements IBoundingPoly { + /** Properties of an AnnotationValue. */ + interface IAnnotationValue { + + /** AnnotationValue imageClassificationAnnotation */ + imageClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation|null); + + /** AnnotationValue imageBoundingPolyAnnotation */ + imageBoundingPolyAnnotation?: (google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation|null); + + /** AnnotationValue imagePolylineAnnotation */ + imagePolylineAnnotation?: (google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation|null); + + /** AnnotationValue imageSegmentationAnnotation */ + imageSegmentationAnnotation?: (google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation|null); + + /** AnnotationValue textClassificationAnnotation */ + textClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation|null); + + /** AnnotationValue textEntityExtractionAnnotation */ + textEntityExtractionAnnotation?: (google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation|null); + + /** AnnotationValue videoClassificationAnnotation */ + videoClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation|null); + + /** AnnotationValue videoObjectTrackingAnnotation */ + videoObjectTrackingAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation|null); + + /** AnnotationValue videoEventAnnotation */ + videoEventAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoEventAnnotation|null); + } + + /** Represents an AnnotationValue. */ + class AnnotationValue implements IAnnotationValue { /** - * Constructs a new BoundingPoly. + * Constructs a new AnnotationValue. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IBoundingPoly); + constructor(properties?: google.cloud.datalabeling.v1beta1.IAnnotationValue); - /** BoundingPoly vertices. */ - public vertices: google.cloud.datalabeling.v1beta1.IVertex[]; + /** AnnotationValue imageClassificationAnnotation. */ + public imageClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation|null); + + /** AnnotationValue imageBoundingPolyAnnotation. */ + public imageBoundingPolyAnnotation?: (google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation|null); + + /** AnnotationValue imagePolylineAnnotation. */ + public imagePolylineAnnotation?: (google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation|null); + + /** AnnotationValue imageSegmentationAnnotation. */ + public imageSegmentationAnnotation?: (google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation|null); + + /** AnnotationValue textClassificationAnnotation. */ + public textClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation|null); + + /** AnnotationValue textEntityExtractionAnnotation. */ + public textEntityExtractionAnnotation?: (google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation|null); + + /** AnnotationValue videoClassificationAnnotation. */ + public videoClassificationAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation|null); + + /** AnnotationValue videoObjectTrackingAnnotation. */ + public videoObjectTrackingAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation|null); + + /** AnnotationValue videoEventAnnotation. */ + public videoEventAnnotation?: (google.cloud.datalabeling.v1beta1.IVideoEventAnnotation|null); + + /** AnnotationValue valueType. */ + public valueType?: ("imageClassificationAnnotation"|"imageBoundingPolyAnnotation"|"imagePolylineAnnotation"|"imageSegmentationAnnotation"|"textClassificationAnnotation"|"textEntityExtractionAnnotation"|"videoClassificationAnnotation"|"videoObjectTrackingAnnotation"|"videoEventAnnotation"); /** - * Creates a new BoundingPoly instance using the specified properties. + * Creates a new AnnotationValue instance using the specified properties. * @param [properties] Properties to set - * @returns BoundingPoly instance + * @returns AnnotationValue instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IBoundingPoly): google.cloud.datalabeling.v1beta1.BoundingPoly; + public static create(properties?: google.cloud.datalabeling.v1beta1.IAnnotationValue): google.cloud.datalabeling.v1beta1.AnnotationValue; /** - * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.BoundingPoly.verify|verify} messages. - * @param message BoundingPoly message or plain object to encode + * Encodes the specified AnnotationValue message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationValue.verify|verify} messages. + * @param message AnnotationValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IAnnotationValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.BoundingPoly.verify|verify} messages. - * @param message BoundingPoly message or plain object to encode + * Encodes the specified AnnotationValue message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationValue.verify|verify} messages. + * @param message AnnotationValue message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IAnnotationValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a BoundingPoly message from the specified reader or buffer. + * Decodes an AnnotationValue message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns BoundingPoly + * @returns AnnotationValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.BoundingPoly; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.AnnotationValue; /** - * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. + * Decodes an AnnotationValue message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns BoundingPoly + * @returns AnnotationValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.BoundingPoly; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.AnnotationValue; /** - * Verifies a BoundingPoly message. + * Verifies an AnnotationValue message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BoundingPoly + * @returns AnnotationValue */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.BoundingPoly; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.AnnotationValue; /** - * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. - * @param message BoundingPoly + * Creates a plain object from an AnnotationValue message. Also converts values to other types if specified. + * @param message AnnotationValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.BoundingPoly, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.AnnotationValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BoundingPoly to JSON. + * Converts this AnnotationValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a NormalizedBoundingPoly. */ - interface INormalizedBoundingPoly { + /** Properties of an ImageClassificationAnnotation. */ + interface IImageClassificationAnnotation { - /** NormalizedBoundingPoly normalizedVertices */ - normalizedVertices?: (google.cloud.datalabeling.v1beta1.INormalizedVertex[]|null); + /** ImageClassificationAnnotation annotationSpec */ + annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); } - /** Represents a NormalizedBoundingPoly. */ - class NormalizedBoundingPoly implements INormalizedBoundingPoly { + /** Represents an ImageClassificationAnnotation. */ + class ImageClassificationAnnotation implements IImageClassificationAnnotation { /** - * Constructs a new NormalizedBoundingPoly. + * Constructs a new ImageClassificationAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly); + constructor(properties?: google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation); - /** NormalizedBoundingPoly normalizedVertices. */ - public normalizedVertices: google.cloud.datalabeling.v1beta1.INormalizedVertex[]; + /** ImageClassificationAnnotation annotationSpec. */ + public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); /** - * Creates a new NormalizedBoundingPoly instance using the specified properties. + * Creates a new ImageClassificationAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns NormalizedBoundingPoly instance + * @returns ImageClassificationAnnotation instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly): google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly; + public static create(properties?: google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation): google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation; /** - * Encodes the specified NormalizedBoundingPoly message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify|verify} messages. - * @param message NormalizedBoundingPoly message or plain object to encode + * Encodes the specified ImageClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.verify|verify} messages. + * @param message ImageClassificationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NormalizedBoundingPoly message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify|verify} messages. - * @param message NormalizedBoundingPoly message or plain object to encode + * Encodes the specified ImageClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.verify|verify} messages. + * @param message ImageClassificationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NormalizedBoundingPoly message from the specified reader or buffer. + * Decodes an ImageClassificationAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NormalizedBoundingPoly + * @returns ImageClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation; /** - * Decodes a NormalizedBoundingPoly message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NormalizedBoundingPoly + * @returns ImageClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation; /** - * Verifies a NormalizedBoundingPoly message. + * Verifies an ImageClassificationAnnotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NormalizedBoundingPoly message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NormalizedBoundingPoly + * @returns ImageClassificationAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation; /** - * Creates a plain object from a NormalizedBoundingPoly message. Also converts values to other types if specified. - * @param message NormalizedBoundingPoly + * Creates a plain object from an ImageClassificationAnnotation message. Also converts values to other types if specified. + * @param message ImageClassificationAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NormalizedBoundingPoly to JSON. + * Converts this ImageClassificationAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageBoundingPolyAnnotation. */ - interface IImageBoundingPolyAnnotation { - - /** ImageBoundingPolyAnnotation boundingPoly */ - boundingPoly?: (google.cloud.datalabeling.v1beta1.IBoundingPoly|null); + /** Properties of a Vertex. */ + interface IVertex { - /** ImageBoundingPolyAnnotation normalizedBoundingPoly */ - normalizedBoundingPoly?: (google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null); + /** Vertex x */ + x?: (number|null); - /** ImageBoundingPolyAnnotation annotationSpec */ - annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + /** Vertex y */ + y?: (number|null); } - /** Represents an ImageBoundingPolyAnnotation. */ - class ImageBoundingPolyAnnotation implements IImageBoundingPolyAnnotation { + /** Represents a Vertex. */ + class Vertex implements IVertex { /** - * Constructs a new ImageBoundingPolyAnnotation. + * Constructs a new Vertex. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation); - - /** ImageBoundingPolyAnnotation boundingPoly. */ - public boundingPoly?: (google.cloud.datalabeling.v1beta1.IBoundingPoly|null); - - /** ImageBoundingPolyAnnotation normalizedBoundingPoly. */ - public normalizedBoundingPoly?: (google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null); + constructor(properties?: google.cloud.datalabeling.v1beta1.IVertex); - /** ImageBoundingPolyAnnotation annotationSpec. */ - public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + /** Vertex x. */ + public x: number; - /** ImageBoundingPolyAnnotation boundedArea. */ - public boundedArea?: ("boundingPoly"|"normalizedBoundingPoly"); + /** Vertex y. */ + public y: number; /** - * Creates a new ImageBoundingPolyAnnotation instance using the specified properties. + * Creates a new Vertex instance using the specified properties. * @param [properties] Properties to set - * @returns ImageBoundingPolyAnnotation instance + * @returns Vertex instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation): google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation; + public static create(properties?: google.cloud.datalabeling.v1beta1.IVertex): google.cloud.datalabeling.v1beta1.Vertex; /** - * Encodes the specified ImageBoundingPolyAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.verify|verify} messages. - * @param message ImageBoundingPolyAnnotation message or plain object to encode + * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Vertex.verify|verify} messages. + * @param message Vertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageBoundingPolyAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.verify|verify} messages. - * @param message ImageBoundingPolyAnnotation message or plain object to encode + * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Vertex.verify|verify} messages. + * @param message Vertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageBoundingPolyAnnotation message from the specified reader or buffer. + * Decodes a Vertex message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageBoundingPolyAnnotation + * @returns Vertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.Vertex; /** - * Decodes an ImageBoundingPolyAnnotation message from the specified reader or buffer, length delimited. + * Decodes a Vertex message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageBoundingPolyAnnotation + * @returns Vertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.Vertex; /** - * Verifies an ImageBoundingPolyAnnotation message. + * Verifies a Vertex message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImageBoundingPolyAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a Vertex message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageBoundingPolyAnnotation + * @returns Vertex */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.Vertex; /** - * Creates a plain object from an ImageBoundingPolyAnnotation message. Also converts values to other types if specified. - * @param message ImageBoundingPolyAnnotation + * Creates a plain object from a Vertex message. Also converts values to other types if specified. + * @param message Vertex * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.Vertex, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageBoundingPolyAnnotation to JSON. + * Converts this Vertex to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Polyline. */ - interface IPolyline { + /** Properties of a NormalizedVertex. */ + interface INormalizedVertex { - /** Polyline vertices */ - vertices?: (google.cloud.datalabeling.v1beta1.IVertex[]|null); + /** NormalizedVertex x */ + x?: (number|null); + + /** NormalizedVertex y */ + y?: (number|null); } - /** Represents a Polyline. */ - class Polyline implements IPolyline { + /** Represents a NormalizedVertex. */ + class NormalizedVertex implements INormalizedVertex { /** - * Constructs a new Polyline. + * Constructs a new NormalizedVertex. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IPolyline); + constructor(properties?: google.cloud.datalabeling.v1beta1.INormalizedVertex); - /** Polyline vertices. */ - public vertices: google.cloud.datalabeling.v1beta1.IVertex[]; + /** NormalizedVertex x. */ + public x: number; + + /** NormalizedVertex y. */ + public y: number; /** - * Creates a new Polyline instance using the specified properties. + * Creates a new NormalizedVertex instance using the specified properties. * @param [properties] Properties to set - * @returns Polyline instance + * @returns NormalizedVertex instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IPolyline): google.cloud.datalabeling.v1beta1.Polyline; + public static create(properties?: google.cloud.datalabeling.v1beta1.INormalizedVertex): google.cloud.datalabeling.v1beta1.NormalizedVertex; /** - * Encodes the specified Polyline message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Polyline.verify|verify} messages. - * @param message Polyline message or plain object to encode + * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedVertex.verify|verify} messages. + * @param message NormalizedVertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IPolyline, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Polyline message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Polyline.verify|verify} messages. - * @param message Polyline message or plain object to encode + * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedVertex.verify|verify} messages. + * @param message NormalizedVertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IPolyline, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Polyline message from the specified reader or buffer. + * Decodes a NormalizedVertex message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Polyline + * @returns NormalizedVertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.Polyline; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.NormalizedVertex; /** - * Decodes a Polyline message from the specified reader or buffer, length delimited. + * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Polyline + * @returns NormalizedVertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.Polyline; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.NormalizedVertex; /** - * Verifies a Polyline message. + * Verifies a NormalizedVertex message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Polyline message from a plain object. Also converts values to their respective internal types. + * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Polyline + * @returns NormalizedVertex */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.Polyline; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.NormalizedVertex; /** - * Creates a plain object from a Polyline message. Also converts values to other types if specified. - * @param message Polyline + * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. + * @param message NormalizedVertex * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.Polyline, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.NormalizedVertex, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Polyline to JSON. + * Converts this NormalizedVertex to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a NormalizedPolyline. */ - interface INormalizedPolyline { + /** Properties of a BoundingPoly. */ + interface IBoundingPoly { - /** NormalizedPolyline normalizedVertices */ - normalizedVertices?: (google.cloud.datalabeling.v1beta1.INormalizedVertex[]|null); + /** BoundingPoly vertices */ + vertices?: (google.cloud.datalabeling.v1beta1.IVertex[]|null); } - /** Represents a NormalizedPolyline. */ - class NormalizedPolyline implements INormalizedPolyline { + /** Represents a BoundingPoly. */ + class BoundingPoly implements IBoundingPoly { /** - * Constructs a new NormalizedPolyline. + * Constructs a new BoundingPoly. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.INormalizedPolyline); + constructor(properties?: google.cloud.datalabeling.v1beta1.IBoundingPoly); - /** NormalizedPolyline normalizedVertices. */ - public normalizedVertices: google.cloud.datalabeling.v1beta1.INormalizedVertex[]; + /** BoundingPoly vertices. */ + public vertices: google.cloud.datalabeling.v1beta1.IVertex[]; /** - * Creates a new NormalizedPolyline instance using the specified properties. + * Creates a new BoundingPoly instance using the specified properties. * @param [properties] Properties to set - * @returns NormalizedPolyline instance + * @returns BoundingPoly instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.INormalizedPolyline): google.cloud.datalabeling.v1beta1.NormalizedPolyline; + public static create(properties?: google.cloud.datalabeling.v1beta1.IBoundingPoly): google.cloud.datalabeling.v1beta1.BoundingPoly; /** - * Encodes the specified NormalizedPolyline message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedPolyline.verify|verify} messages. - * @param message NormalizedPolyline message or plain object to encode + * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.BoundingPoly.verify|verify} messages. + * @param message BoundingPoly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.INormalizedPolyline, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NormalizedPolyline message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedPolyline.verify|verify} messages. - * @param message NormalizedPolyline message or plain object to encode + * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.BoundingPoly.verify|verify} messages. + * @param message BoundingPoly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.INormalizedPolyline, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NormalizedPolyline message from the specified reader or buffer. + * Decodes a BoundingPoly message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NormalizedPolyline + * @returns BoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.NormalizedPolyline; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.BoundingPoly; /** - * Decodes a NormalizedPolyline message from the specified reader or buffer, length delimited. + * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NormalizedPolyline + * @returns BoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.NormalizedPolyline; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.BoundingPoly; /** - * Verifies a NormalizedPolyline message. + * Verifies a BoundingPoly message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a NormalizedPolyline message from a plain object. Also converts values to their respective internal types. + * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NormalizedPolyline + * @returns BoundingPoly */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.NormalizedPolyline; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.BoundingPoly; /** - * Creates a plain object from a NormalizedPolyline message. Also converts values to other types if specified. - * @param message NormalizedPolyline + * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. + * @param message BoundingPoly * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.NormalizedPolyline, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.BoundingPoly, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NormalizedPolyline to JSON. + * Converts this BoundingPoly to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImagePolylineAnnotation. */ - interface IImagePolylineAnnotation { - - /** ImagePolylineAnnotation polyline */ - polyline?: (google.cloud.datalabeling.v1beta1.IPolyline|null); - - /** ImagePolylineAnnotation normalizedPolyline */ - normalizedPolyline?: (google.cloud.datalabeling.v1beta1.INormalizedPolyline|null); + /** Properties of a NormalizedBoundingPoly. */ + interface INormalizedBoundingPoly { - /** ImagePolylineAnnotation annotationSpec */ - annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + /** NormalizedBoundingPoly normalizedVertices */ + normalizedVertices?: (google.cloud.datalabeling.v1beta1.INormalizedVertex[]|null); } - /** Represents an ImagePolylineAnnotation. */ - class ImagePolylineAnnotation implements IImagePolylineAnnotation { + /** Represents a NormalizedBoundingPoly. */ + class NormalizedBoundingPoly implements INormalizedBoundingPoly { /** - * Constructs a new ImagePolylineAnnotation. + * Constructs a new NormalizedBoundingPoly. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation); - - /** ImagePolylineAnnotation polyline. */ - public polyline?: (google.cloud.datalabeling.v1beta1.IPolyline|null); - - /** ImagePolylineAnnotation normalizedPolyline. */ - public normalizedPolyline?: (google.cloud.datalabeling.v1beta1.INormalizedPolyline|null); - - /** ImagePolylineAnnotation annotationSpec. */ - public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + constructor(properties?: google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly); - /** ImagePolylineAnnotation poly. */ - public poly?: ("polyline"|"normalizedPolyline"); + /** NormalizedBoundingPoly normalizedVertices. */ + public normalizedVertices: google.cloud.datalabeling.v1beta1.INormalizedVertex[]; /** - * Creates a new ImagePolylineAnnotation instance using the specified properties. + * Creates a new NormalizedBoundingPoly instance using the specified properties. * @param [properties] Properties to set - * @returns ImagePolylineAnnotation instance + * @returns NormalizedBoundingPoly instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation): google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation; + public static create(properties?: google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly): google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly; /** - * Encodes the specified ImagePolylineAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.verify|verify} messages. - * @param message ImagePolylineAnnotation message or plain object to encode + * Encodes the specified NormalizedBoundingPoly message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify|verify} messages. + * @param message NormalizedBoundingPoly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImagePolylineAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.verify|verify} messages. - * @param message ImagePolylineAnnotation message or plain object to encode + * Encodes the specified NormalizedBoundingPoly message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify|verify} messages. + * @param message NormalizedBoundingPoly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImagePolylineAnnotation message from the specified reader or buffer. + * Decodes a NormalizedBoundingPoly message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImagePolylineAnnotation + * @returns NormalizedBoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly; /** - * Decodes an ImagePolylineAnnotation message from the specified reader or buffer, length delimited. + * Decodes a NormalizedBoundingPoly message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImagePolylineAnnotation + * @returns NormalizedBoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly; /** - * Verifies an ImagePolylineAnnotation message. + * Verifies a NormalizedBoundingPoly message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImagePolylineAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a NormalizedBoundingPoly message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImagePolylineAnnotation + * @returns NormalizedBoundingPoly */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly; /** - * Creates a plain object from an ImagePolylineAnnotation message. Also converts values to other types if specified. - * @param message ImagePolylineAnnotation + * Creates a plain object from a NormalizedBoundingPoly message. Also converts values to other types if specified. + * @param message NormalizedBoundingPoly * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImagePolylineAnnotation to JSON. + * Converts this NormalizedBoundingPoly to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImageSegmentationAnnotation. */ - interface IImageSegmentationAnnotation { + /** Properties of an ImageBoundingPolyAnnotation. */ + interface IImageBoundingPolyAnnotation { - /** ImageSegmentationAnnotation annotationColors */ - annotationColors?: ({ [k: string]: google.cloud.datalabeling.v1beta1.IAnnotationSpec }|null); + /** ImageBoundingPolyAnnotation boundingPoly */ + boundingPoly?: (google.cloud.datalabeling.v1beta1.IBoundingPoly|null); - /** ImageSegmentationAnnotation mimeType */ - mimeType?: (string|null); + /** ImageBoundingPolyAnnotation normalizedBoundingPoly */ + normalizedBoundingPoly?: (google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null); - /** ImageSegmentationAnnotation imageBytes */ - imageBytes?: (Uint8Array|string|null); + /** ImageBoundingPolyAnnotation annotationSpec */ + annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); } - /** Represents an ImageSegmentationAnnotation. */ - class ImageSegmentationAnnotation implements IImageSegmentationAnnotation { + /** Represents an ImageBoundingPolyAnnotation. */ + class ImageBoundingPolyAnnotation implements IImageBoundingPolyAnnotation { /** - * Constructs a new ImageSegmentationAnnotation. + * Constructs a new ImageBoundingPolyAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation); + constructor(properties?: google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation); - /** ImageSegmentationAnnotation annotationColors. */ - public annotationColors: { [k: string]: google.cloud.datalabeling.v1beta1.IAnnotationSpec }; + /** ImageBoundingPolyAnnotation boundingPoly. */ + public boundingPoly?: (google.cloud.datalabeling.v1beta1.IBoundingPoly|null); - /** ImageSegmentationAnnotation mimeType. */ - public mimeType: string; + /** ImageBoundingPolyAnnotation normalizedBoundingPoly. */ + public normalizedBoundingPoly?: (google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null); - /** ImageSegmentationAnnotation imageBytes. */ - public imageBytes: (Uint8Array|string); + /** ImageBoundingPolyAnnotation annotationSpec. */ + public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + + /** ImageBoundingPolyAnnotation boundedArea. */ + public boundedArea?: ("boundingPoly"|"normalizedBoundingPoly"); /** - * Creates a new ImageSegmentationAnnotation instance using the specified properties. + * Creates a new ImageBoundingPolyAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns ImageSegmentationAnnotation instance + * @returns ImageBoundingPolyAnnotation instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation): google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation; + public static create(properties?: google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation): google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation; /** - * Encodes the specified ImageSegmentationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.verify|verify} messages. - * @param message ImageSegmentationAnnotation message or plain object to encode + * Encodes the specified ImageBoundingPolyAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.verify|verify} messages. + * @param message ImageBoundingPolyAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImageSegmentationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.verify|verify} messages. - * @param message ImageSegmentationAnnotation message or plain object to encode + * Encodes the specified ImageBoundingPolyAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.verify|verify} messages. + * @param message ImageBoundingPolyAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImageSegmentationAnnotation message from the specified reader or buffer. + * Decodes an ImageBoundingPolyAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImageSegmentationAnnotation + * @returns ImageBoundingPolyAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation; /** - * Decodes an ImageSegmentationAnnotation message from the specified reader or buffer, length delimited. + * Decodes an ImageBoundingPolyAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImageSegmentationAnnotation + * @returns ImageBoundingPolyAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation; /** - * Verifies an ImageSegmentationAnnotation message. + * Verifies an ImageBoundingPolyAnnotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImageSegmentationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an ImageBoundingPolyAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImageSegmentationAnnotation + * @returns ImageBoundingPolyAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation; /** - * Creates a plain object from an ImageSegmentationAnnotation message. Also converts values to other types if specified. - * @param message ImageSegmentationAnnotation + * Creates a plain object from an ImageBoundingPolyAnnotation message. Also converts values to other types if specified. + * @param message ImageBoundingPolyAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImageSegmentationAnnotation to JSON. + * Converts this ImageBoundingPolyAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextClassificationAnnotation. */ - interface ITextClassificationAnnotation { + /** Properties of a Polyline. */ + interface IPolyline { - /** TextClassificationAnnotation annotationSpec */ - annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + /** Polyline vertices */ + vertices?: (google.cloud.datalabeling.v1beta1.IVertex[]|null); } - /** Represents a TextClassificationAnnotation. */ - class TextClassificationAnnotation implements ITextClassificationAnnotation { + /** Represents a Polyline. */ + class Polyline implements IPolyline { /** - * Constructs a new TextClassificationAnnotation. + * Constructs a new Polyline. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation); + constructor(properties?: google.cloud.datalabeling.v1beta1.IPolyline); - /** TextClassificationAnnotation annotationSpec. */ - public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + /** Polyline vertices. */ + public vertices: google.cloud.datalabeling.v1beta1.IVertex[]; /** - * Creates a new TextClassificationAnnotation instance using the specified properties. + * Creates a new Polyline instance using the specified properties. * @param [properties] Properties to set - * @returns TextClassificationAnnotation instance + * @returns Polyline instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation): google.cloud.datalabeling.v1beta1.TextClassificationAnnotation; + public static create(properties?: google.cloud.datalabeling.v1beta1.IPolyline): google.cloud.datalabeling.v1beta1.Polyline; /** - * Encodes the specified TextClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.verify|verify} messages. - * @param message TextClassificationAnnotation message or plain object to encode + * Encodes the specified Polyline message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Polyline.verify|verify} messages. + * @param message Polyline message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IPolyline, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.verify|verify} messages. - * @param message TextClassificationAnnotation message or plain object to encode + * Encodes the specified Polyline message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Polyline.verify|verify} messages. + * @param message Polyline message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IPolyline, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextClassificationAnnotation message from the specified reader or buffer. + * Decodes a Polyline message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextClassificationAnnotation + * @returns Polyline * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.TextClassificationAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.Polyline; /** - * Decodes a TextClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes a Polyline message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextClassificationAnnotation + * @returns Polyline * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.TextClassificationAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.Polyline; /** - * Verifies a TextClassificationAnnotation message. + * Verifies a Polyline message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TextClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a Polyline message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextClassificationAnnotation + * @returns Polyline */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.TextClassificationAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.Polyline; /** - * Creates a plain object from a TextClassificationAnnotation message. Also converts values to other types if specified. - * @param message TextClassificationAnnotation + * Creates a plain object from a Polyline message. Also converts values to other types if specified. + * @param message Polyline * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.TextClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.Polyline, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextClassificationAnnotation to JSON. + * Converts this Polyline to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextEntityExtractionAnnotation. */ - interface ITextEntityExtractionAnnotation { - - /** TextEntityExtractionAnnotation annotationSpec */ - annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + /** Properties of a NormalizedPolyline. */ + interface INormalizedPolyline { - /** TextEntityExtractionAnnotation sequentialSegment */ - sequentialSegment?: (google.cloud.datalabeling.v1beta1.ISequentialSegment|null); + /** NormalizedPolyline normalizedVertices */ + normalizedVertices?: (google.cloud.datalabeling.v1beta1.INormalizedVertex[]|null); } - /** Represents a TextEntityExtractionAnnotation. */ - class TextEntityExtractionAnnotation implements ITextEntityExtractionAnnotation { + /** Represents a NormalizedPolyline. */ + class NormalizedPolyline implements INormalizedPolyline { /** - * Constructs a new TextEntityExtractionAnnotation. + * Constructs a new NormalizedPolyline. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation); - - /** TextEntityExtractionAnnotation annotationSpec. */ - public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + constructor(properties?: google.cloud.datalabeling.v1beta1.INormalizedPolyline); - /** TextEntityExtractionAnnotation sequentialSegment. */ - public sequentialSegment?: (google.cloud.datalabeling.v1beta1.ISequentialSegment|null); + /** NormalizedPolyline normalizedVertices. */ + public normalizedVertices: google.cloud.datalabeling.v1beta1.INormalizedVertex[]; /** - * Creates a new TextEntityExtractionAnnotation instance using the specified properties. + * Creates a new NormalizedPolyline instance using the specified properties. * @param [properties] Properties to set - * @returns TextEntityExtractionAnnotation instance + * @returns NormalizedPolyline instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation): google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation; + public static create(properties?: google.cloud.datalabeling.v1beta1.INormalizedPolyline): google.cloud.datalabeling.v1beta1.NormalizedPolyline; /** - * Encodes the specified TextEntityExtractionAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.verify|verify} messages. - * @param message TextEntityExtractionAnnotation message or plain object to encode + * Encodes the specified NormalizedPolyline message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedPolyline.verify|verify} messages. + * @param message NormalizedPolyline message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.INormalizedPolyline, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextEntityExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.verify|verify} messages. - * @param message TextEntityExtractionAnnotation message or plain object to encode + * Encodes the specified NormalizedPolyline message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedPolyline.verify|verify} messages. + * @param message NormalizedPolyline message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.INormalizedPolyline, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextEntityExtractionAnnotation message from the specified reader or buffer. + * Decodes a NormalizedPolyline message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextEntityExtractionAnnotation + * @returns NormalizedPolyline * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.NormalizedPolyline; /** - * Decodes a TextEntityExtractionAnnotation message from the specified reader or buffer, length delimited. + * Decodes a NormalizedPolyline message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextEntityExtractionAnnotation + * @returns NormalizedPolyline * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.NormalizedPolyline; /** - * Verifies a TextEntityExtractionAnnotation message. + * Verifies a NormalizedPolyline message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TextEntityExtractionAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a NormalizedPolyline message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextEntityExtractionAnnotation + * @returns NormalizedPolyline */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.NormalizedPolyline; /** - * Creates a plain object from a TextEntityExtractionAnnotation message. Also converts values to other types if specified. - * @param message TextEntityExtractionAnnotation + * Creates a plain object from a NormalizedPolyline message. Also converts values to other types if specified. + * @param message NormalizedPolyline * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.NormalizedPolyline, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextEntityExtractionAnnotation to JSON. + * Converts this NormalizedPolyline to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a SequentialSegment. */ - interface ISequentialSegment { + /** Properties of an ImagePolylineAnnotation. */ + interface IImagePolylineAnnotation { - /** SequentialSegment start */ - start?: (number|null); + /** ImagePolylineAnnotation polyline */ + polyline?: (google.cloud.datalabeling.v1beta1.IPolyline|null); - /** SequentialSegment end */ - end?: (number|null); + /** ImagePolylineAnnotation normalizedPolyline */ + normalizedPolyline?: (google.cloud.datalabeling.v1beta1.INormalizedPolyline|null); + + /** ImagePolylineAnnotation annotationSpec */ + annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); } - /** Represents a SequentialSegment. */ - class SequentialSegment implements ISequentialSegment { + /** Represents an ImagePolylineAnnotation. */ + class ImagePolylineAnnotation implements IImagePolylineAnnotation { /** - * Constructs a new SequentialSegment. + * Constructs a new ImagePolylineAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.ISequentialSegment); + constructor(properties?: google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation); - /** SequentialSegment start. */ - public start: number; + /** ImagePolylineAnnotation polyline. */ + public polyline?: (google.cloud.datalabeling.v1beta1.IPolyline|null); - /** SequentialSegment end. */ - public end: number; + /** ImagePolylineAnnotation normalizedPolyline. */ + public normalizedPolyline?: (google.cloud.datalabeling.v1beta1.INormalizedPolyline|null); + + /** ImagePolylineAnnotation annotationSpec. */ + public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + + /** ImagePolylineAnnotation poly. */ + public poly?: ("polyline"|"normalizedPolyline"); /** - * Creates a new SequentialSegment instance using the specified properties. + * Creates a new ImagePolylineAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns SequentialSegment instance + * @returns ImagePolylineAnnotation instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.ISequentialSegment): google.cloud.datalabeling.v1beta1.SequentialSegment; + public static create(properties?: google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation): google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation; /** - * Encodes the specified SequentialSegment message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.SequentialSegment.verify|verify} messages. - * @param message SequentialSegment message or plain object to encode + * Encodes the specified ImagePolylineAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.verify|verify} messages. + * @param message ImagePolylineAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.ISequentialSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SequentialSegment message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.SequentialSegment.verify|verify} messages. - * @param message SequentialSegment message or plain object to encode + * Encodes the specified ImagePolylineAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.verify|verify} messages. + * @param message ImagePolylineAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.ISequentialSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SequentialSegment message from the specified reader or buffer. + * Decodes an ImagePolylineAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SequentialSegment + * @returns ImagePolylineAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.SequentialSegment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation; /** - * Decodes a SequentialSegment message from the specified reader or buffer, length delimited. + * Decodes an ImagePolylineAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SequentialSegment + * @returns ImagePolylineAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.SequentialSegment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation; /** - * Verifies a SequentialSegment message. + * Verifies an ImagePolylineAnnotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SequentialSegment message from a plain object. Also converts values to their respective internal types. + * Creates an ImagePolylineAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SequentialSegment + * @returns ImagePolylineAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.SequentialSegment; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation; /** - * Creates a plain object from a SequentialSegment message. Also converts values to other types if specified. - * @param message SequentialSegment + * Creates a plain object from an ImagePolylineAnnotation message. Also converts values to other types if specified. + * @param message ImagePolylineAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.SequentialSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SequentialSegment to JSON. + * Converts this ImagePolylineAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TimeSegment. */ - interface ITimeSegment { + /** Properties of an ImageSegmentationAnnotation. */ + interface IImageSegmentationAnnotation { - /** TimeSegment startTimeOffset */ - startTimeOffset?: (google.protobuf.IDuration|null); + /** ImageSegmentationAnnotation annotationColors */ + annotationColors?: ({ [k: string]: google.cloud.datalabeling.v1beta1.IAnnotationSpec }|null); - /** TimeSegment endTimeOffset */ - endTimeOffset?: (google.protobuf.IDuration|null); + /** ImageSegmentationAnnotation mimeType */ + mimeType?: (string|null); + + /** ImageSegmentationAnnotation imageBytes */ + imageBytes?: (Uint8Array|string|null); } - /** Represents a TimeSegment. */ - class TimeSegment implements ITimeSegment { + /** Represents an ImageSegmentationAnnotation. */ + class ImageSegmentationAnnotation implements IImageSegmentationAnnotation { /** - * Constructs a new TimeSegment. + * Constructs a new ImageSegmentationAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.ITimeSegment); + constructor(properties?: google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation); - /** TimeSegment startTimeOffset. */ - public startTimeOffset?: (google.protobuf.IDuration|null); + /** ImageSegmentationAnnotation annotationColors. */ + public annotationColors: { [k: string]: google.cloud.datalabeling.v1beta1.IAnnotationSpec }; - /** TimeSegment endTimeOffset. */ - public endTimeOffset?: (google.protobuf.IDuration|null); + /** ImageSegmentationAnnotation mimeType. */ + public mimeType: string; + + /** ImageSegmentationAnnotation imageBytes. */ + public imageBytes: (Uint8Array|string); /** - * Creates a new TimeSegment instance using the specified properties. + * Creates a new ImageSegmentationAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns TimeSegment instance + * @returns ImageSegmentationAnnotation instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.ITimeSegment): google.cloud.datalabeling.v1beta1.TimeSegment; + public static create(properties?: google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation): google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation; /** - * Encodes the specified TimeSegment message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TimeSegment.verify|verify} messages. - * @param message TimeSegment message or plain object to encode + * Encodes the specified ImageSegmentationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.verify|verify} messages. + * @param message ImageSegmentationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.ITimeSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TimeSegment message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TimeSegment.verify|verify} messages. - * @param message TimeSegment message or plain object to encode + * Encodes the specified ImageSegmentationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.verify|verify} messages. + * @param message ImageSegmentationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.ITimeSegment, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TimeSegment message from the specified reader or buffer. + * Decodes an ImageSegmentationAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TimeSegment + * @returns ImageSegmentationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.TimeSegment; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation; /** - * Decodes a TimeSegment message from the specified reader or buffer, length delimited. + * Decodes an ImageSegmentationAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TimeSegment + * @returns ImageSegmentationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.TimeSegment; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation; /** - * Verifies a TimeSegment message. + * Verifies an ImageSegmentationAnnotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TimeSegment message from a plain object. Also converts values to their respective internal types. + * Creates an ImageSegmentationAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TimeSegment + * @returns ImageSegmentationAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.TimeSegment; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation; /** - * Creates a plain object from a TimeSegment message. Also converts values to other types if specified. - * @param message TimeSegment + * Creates a plain object from an ImageSegmentationAnnotation message. Also converts values to other types if specified. + * @param message ImageSegmentationAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.TimeSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TimeSegment to JSON. + * Converts this ImageSegmentationAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoClassificationAnnotation. */ - interface IVideoClassificationAnnotation { - - /** VideoClassificationAnnotation timeSegment */ - timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); + /** Properties of a TextClassificationAnnotation. */ + interface ITextClassificationAnnotation { - /** VideoClassificationAnnotation annotationSpec */ + /** TextClassificationAnnotation annotationSpec */ annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); } - /** Represents a VideoClassificationAnnotation. */ - class VideoClassificationAnnotation implements IVideoClassificationAnnotation { + /** Represents a TextClassificationAnnotation. */ + class TextClassificationAnnotation implements ITextClassificationAnnotation { /** - * Constructs a new VideoClassificationAnnotation. + * Constructs a new TextClassificationAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation); - - /** VideoClassificationAnnotation timeSegment. */ - public timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); + constructor(properties?: google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation); - /** VideoClassificationAnnotation annotationSpec. */ + /** TextClassificationAnnotation annotationSpec. */ public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); /** - * Creates a new VideoClassificationAnnotation instance using the specified properties. + * Creates a new TextClassificationAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns VideoClassificationAnnotation instance + * @returns TextClassificationAnnotation instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation): google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation; + public static create(properties?: google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation): google.cloud.datalabeling.v1beta1.TextClassificationAnnotation; /** - * Encodes the specified VideoClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.verify|verify} messages. - * @param message VideoClassificationAnnotation message or plain object to encode + * Encodes the specified TextClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.verify|verify} messages. + * @param message TextClassificationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.verify|verify} messages. - * @param message VideoClassificationAnnotation message or plain object to encode + * Encodes the specified TextClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.verify|verify} messages. + * @param message TextClassificationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoClassificationAnnotation message from the specified reader or buffer. + * Decodes a TextClassificationAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoClassificationAnnotation + * @returns TextClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.TextClassificationAnnotation; /** - * Decodes a VideoClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes a TextClassificationAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoClassificationAnnotation + * @returns TextClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.TextClassificationAnnotation; /** - * Verifies a VideoClassificationAnnotation message. + * Verifies a TextClassificationAnnotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VideoClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a TextClassificationAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoClassificationAnnotation + * @returns TextClassificationAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.TextClassificationAnnotation; /** - * Creates a plain object from a VideoClassificationAnnotation message. Also converts values to other types if specified. - * @param message VideoClassificationAnnotation + * Creates a plain object from a TextClassificationAnnotation message. Also converts values to other types if specified. + * @param message TextClassificationAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.TextClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoClassificationAnnotation to JSON. + * Converts this TextClassificationAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ObjectTrackingFrame. */ - interface IObjectTrackingFrame { - - /** ObjectTrackingFrame boundingPoly */ - boundingPoly?: (google.cloud.datalabeling.v1beta1.IBoundingPoly|null); + /** Properties of a TextEntityExtractionAnnotation. */ + interface ITextEntityExtractionAnnotation { - /** ObjectTrackingFrame normalizedBoundingPoly */ - normalizedBoundingPoly?: (google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null); + /** TextEntityExtractionAnnotation annotationSpec */ + annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); - /** ObjectTrackingFrame timeOffset */ - timeOffset?: (google.protobuf.IDuration|null); + /** TextEntityExtractionAnnotation sequentialSegment */ + sequentialSegment?: (google.cloud.datalabeling.v1beta1.ISequentialSegment|null); } - /** Represents an ObjectTrackingFrame. */ - class ObjectTrackingFrame implements IObjectTrackingFrame { + /** Represents a TextEntityExtractionAnnotation. */ + class TextEntityExtractionAnnotation implements ITextEntityExtractionAnnotation { /** - * Constructs a new ObjectTrackingFrame. + * Constructs a new TextEntityExtractionAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IObjectTrackingFrame); - - /** ObjectTrackingFrame boundingPoly. */ - public boundingPoly?: (google.cloud.datalabeling.v1beta1.IBoundingPoly|null); - - /** ObjectTrackingFrame normalizedBoundingPoly. */ - public normalizedBoundingPoly?: (google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null); + constructor(properties?: google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation); - /** ObjectTrackingFrame timeOffset. */ - public timeOffset?: (google.protobuf.IDuration|null); + /** TextEntityExtractionAnnotation annotationSpec. */ + public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); - /** ObjectTrackingFrame boundedArea. */ - public boundedArea?: ("boundingPoly"|"normalizedBoundingPoly"); + /** TextEntityExtractionAnnotation sequentialSegment. */ + public sequentialSegment?: (google.cloud.datalabeling.v1beta1.ISequentialSegment|null); /** - * Creates a new ObjectTrackingFrame instance using the specified properties. + * Creates a new TextEntityExtractionAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns ObjectTrackingFrame instance + * @returns TextEntityExtractionAnnotation instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IObjectTrackingFrame): google.cloud.datalabeling.v1beta1.ObjectTrackingFrame; + public static create(properties?: google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation): google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation; /** - * Encodes the specified ObjectTrackingFrame message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.verify|verify} messages. - * @param message ObjectTrackingFrame message or plain object to encode + * Encodes the specified TextEntityExtractionAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.verify|verify} messages. + * @param message TextEntityExtractionAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IObjectTrackingFrame, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ObjectTrackingFrame message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.verify|verify} messages. - * @param message ObjectTrackingFrame message or plain object to encode + * Encodes the specified TextEntityExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.verify|verify} messages. + * @param message TextEntityExtractionAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IObjectTrackingFrame, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ObjectTrackingFrame message from the specified reader or buffer. + * Decodes a TextEntityExtractionAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ObjectTrackingFrame + * @returns TextEntityExtractionAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ObjectTrackingFrame; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation; /** - * Decodes an ObjectTrackingFrame message from the specified reader or buffer, length delimited. + * Decodes a TextEntityExtractionAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ObjectTrackingFrame + * @returns TextEntityExtractionAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ObjectTrackingFrame; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation; /** - * Verifies an ObjectTrackingFrame message. + * Verifies a TextEntityExtractionAnnotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ObjectTrackingFrame message from a plain object. Also converts values to their respective internal types. + * Creates a TextEntityExtractionAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ObjectTrackingFrame + * @returns TextEntityExtractionAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ObjectTrackingFrame; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation; /** - * Creates a plain object from an ObjectTrackingFrame message. Also converts values to other types if specified. - * @param message ObjectTrackingFrame + * Creates a plain object from a TextEntityExtractionAnnotation message. Also converts values to other types if specified. + * @param message TextEntityExtractionAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.ObjectTrackingFrame, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ObjectTrackingFrame to JSON. + * Converts this TextEntityExtractionAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoObjectTrackingAnnotation. */ - interface IVideoObjectTrackingAnnotation { - - /** VideoObjectTrackingAnnotation annotationSpec */ - annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + /** Properties of a SequentialSegment. */ + interface ISequentialSegment { - /** VideoObjectTrackingAnnotation timeSegment */ - timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); + /** SequentialSegment start */ + start?: (number|null); - /** VideoObjectTrackingAnnotation objectTrackingFrames */ - objectTrackingFrames?: (google.cloud.datalabeling.v1beta1.IObjectTrackingFrame[]|null); + /** SequentialSegment end */ + end?: (number|null); } - /** Represents a VideoObjectTrackingAnnotation. */ - class VideoObjectTrackingAnnotation implements IVideoObjectTrackingAnnotation { + /** Represents a SequentialSegment. */ + class SequentialSegment implements ISequentialSegment { /** - * Constructs a new VideoObjectTrackingAnnotation. + * Constructs a new SequentialSegment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation); - - /** VideoObjectTrackingAnnotation annotationSpec. */ - public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + constructor(properties?: google.cloud.datalabeling.v1beta1.ISequentialSegment); - /** VideoObjectTrackingAnnotation timeSegment. */ - public timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); + /** SequentialSegment start. */ + public start: number; - /** VideoObjectTrackingAnnotation objectTrackingFrames. */ - public objectTrackingFrames: google.cloud.datalabeling.v1beta1.IObjectTrackingFrame[]; + /** SequentialSegment end. */ + public end: number; /** - * Creates a new VideoObjectTrackingAnnotation instance using the specified properties. + * Creates a new SequentialSegment instance using the specified properties. * @param [properties] Properties to set - * @returns VideoObjectTrackingAnnotation instance + * @returns SequentialSegment instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation): google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation; + public static create(properties?: google.cloud.datalabeling.v1beta1.ISequentialSegment): google.cloud.datalabeling.v1beta1.SequentialSegment; /** - * Encodes the specified VideoObjectTrackingAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. - * @param message VideoObjectTrackingAnnotation message or plain object to encode + * Encodes the specified SequentialSegment message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.SequentialSegment.verify|verify} messages. + * @param message SequentialSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.ISequentialSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoObjectTrackingAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. - * @param message VideoObjectTrackingAnnotation message or plain object to encode + * Encodes the specified SequentialSegment message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.SequentialSegment.verify|verify} messages. + * @param message SequentialSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.ISequentialSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer. + * Decodes a SequentialSegment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoObjectTrackingAnnotation + * @returns SequentialSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.SequentialSegment; /** - * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer, length delimited. + * Decodes a SequentialSegment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoObjectTrackingAnnotation + * @returns SequentialSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.SequentialSegment; /** - * Verifies a VideoObjectTrackingAnnotation message. + * Verifies a SequentialSegment message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VideoObjectTrackingAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a SequentialSegment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoObjectTrackingAnnotation + * @returns SequentialSegment */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.SequentialSegment; /** - * Creates a plain object from a VideoObjectTrackingAnnotation message. Also converts values to other types if specified. - * @param message VideoObjectTrackingAnnotation + * Creates a plain object from a SequentialSegment message. Also converts values to other types if specified. + * @param message SequentialSegment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.SequentialSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoObjectTrackingAnnotation to JSON. + * Converts this SequentialSegment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoEventAnnotation. */ - interface IVideoEventAnnotation { + /** Properties of a TimeSegment. */ + interface ITimeSegment { - /** VideoEventAnnotation annotationSpec */ - annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + /** TimeSegment startTimeOffset */ + startTimeOffset?: (google.protobuf.IDuration|null); - /** VideoEventAnnotation timeSegment */ - timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); + /** TimeSegment endTimeOffset */ + endTimeOffset?: (google.protobuf.IDuration|null); } - /** Represents a VideoEventAnnotation. */ - class VideoEventAnnotation implements IVideoEventAnnotation { + /** Represents a TimeSegment. */ + class TimeSegment implements ITimeSegment { /** - * Constructs a new VideoEventAnnotation. + * Constructs a new TimeSegment. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IVideoEventAnnotation); + constructor(properties?: google.cloud.datalabeling.v1beta1.ITimeSegment); - /** VideoEventAnnotation annotationSpec. */ - public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + /** TimeSegment startTimeOffset. */ + public startTimeOffset?: (google.protobuf.IDuration|null); - /** VideoEventAnnotation timeSegment. */ - public timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); + /** TimeSegment endTimeOffset. */ + public endTimeOffset?: (google.protobuf.IDuration|null); /** - * Creates a new VideoEventAnnotation instance using the specified properties. + * Creates a new TimeSegment instance using the specified properties. * @param [properties] Properties to set - * @returns VideoEventAnnotation instance + * @returns TimeSegment instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IVideoEventAnnotation): google.cloud.datalabeling.v1beta1.VideoEventAnnotation; + public static create(properties?: google.cloud.datalabeling.v1beta1.ITimeSegment): google.cloud.datalabeling.v1beta1.TimeSegment; /** - * Encodes the specified VideoEventAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoEventAnnotation.verify|verify} messages. - * @param message VideoEventAnnotation message or plain object to encode + * Encodes the specified TimeSegment message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TimeSegment.verify|verify} messages. + * @param message TimeSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IVideoEventAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.ITimeSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoEventAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoEventAnnotation.verify|verify} messages. - * @param message VideoEventAnnotation message or plain object to encode + * Encodes the specified TimeSegment message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TimeSegment.verify|verify} messages. + * @param message TimeSegment message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVideoEventAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.ITimeSegment, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoEventAnnotation message from the specified reader or buffer. + * Decodes a TimeSegment message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoEventAnnotation + * @returns TimeSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.VideoEventAnnotation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.TimeSegment; /** - * Decodes a VideoEventAnnotation message from the specified reader or buffer, length delimited. + * Decodes a TimeSegment message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoEventAnnotation + * @returns TimeSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.VideoEventAnnotation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.TimeSegment; /** - * Verifies a VideoEventAnnotation message. + * Verifies a TimeSegment message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VideoEventAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSegment message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoEventAnnotation + * @returns TimeSegment */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.VideoEventAnnotation; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.TimeSegment; /** - * Creates a plain object from a VideoEventAnnotation message. Also converts values to other types if specified. - * @param message VideoEventAnnotation + * Creates a plain object from a TimeSegment message. Also converts values to other types if specified. + * @param message TimeSegment * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.VideoEventAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.TimeSegment, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoEventAnnotation to JSON. + * Converts this TimeSegment to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an AnnotationMetadata. */ - interface IAnnotationMetadata { + /** Properties of a VideoClassificationAnnotation. */ + interface IVideoClassificationAnnotation { - /** AnnotationMetadata operatorMetadata */ - operatorMetadata?: (google.cloud.datalabeling.v1beta1.IOperatorMetadata|null); + /** VideoClassificationAnnotation timeSegment */ + timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); + + /** VideoClassificationAnnotation annotationSpec */ + annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); } - /** Represents an AnnotationMetadata. */ - class AnnotationMetadata implements IAnnotationMetadata { + /** Represents a VideoClassificationAnnotation. */ + class VideoClassificationAnnotation implements IVideoClassificationAnnotation { /** - * Constructs a new AnnotationMetadata. + * Constructs a new VideoClassificationAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IAnnotationMetadata); + constructor(properties?: google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation); - /** AnnotationMetadata operatorMetadata. */ - public operatorMetadata?: (google.cloud.datalabeling.v1beta1.IOperatorMetadata|null); + /** VideoClassificationAnnotation timeSegment. */ + public timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); + + /** VideoClassificationAnnotation annotationSpec. */ + public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); /** - * Creates a new AnnotationMetadata instance using the specified properties. + * Creates a new VideoClassificationAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns AnnotationMetadata instance + * @returns VideoClassificationAnnotation instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IAnnotationMetadata): google.cloud.datalabeling.v1beta1.AnnotationMetadata; + public static create(properties?: google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation): google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation; /** - * Encodes the specified AnnotationMetadata message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationMetadata.verify|verify} messages. - * @param message AnnotationMetadata message or plain object to encode + * Encodes the specified VideoClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.verify|verify} messages. + * @param message VideoClassificationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IAnnotationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified AnnotationMetadata message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationMetadata.verify|verify} messages. - * @param message AnnotationMetadata message or plain object to encode + * Encodes the specified VideoClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.verify|verify} messages. + * @param message VideoClassificationAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IAnnotationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an AnnotationMetadata message from the specified reader or buffer. + * Decodes a VideoClassificationAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns AnnotationMetadata + * @returns VideoClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.AnnotationMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation; /** - * Decodes an AnnotationMetadata message from the specified reader or buffer, length delimited. + * Decodes a VideoClassificationAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns AnnotationMetadata + * @returns VideoClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.AnnotationMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation; /** - * Verifies an AnnotationMetadata message. + * Verifies a VideoClassificationAnnotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an AnnotationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a VideoClassificationAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns AnnotationMetadata + * @returns VideoClassificationAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.AnnotationMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation; /** - * Creates a plain object from an AnnotationMetadata message. Also converts values to other types if specified. - * @param message AnnotationMetadata + * Creates a plain object from a VideoClassificationAnnotation message. Also converts values to other types if specified. + * @param message VideoClassificationAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.AnnotationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this AnnotationMetadata to JSON. + * Converts this VideoClassificationAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an OperatorMetadata. */ - interface IOperatorMetadata { - - /** OperatorMetadata score */ - score?: (number|null); + /** Properties of an ObjectTrackingFrame. */ + interface IObjectTrackingFrame { - /** OperatorMetadata totalVotes */ - totalVotes?: (number|null); + /** ObjectTrackingFrame boundingPoly */ + boundingPoly?: (google.cloud.datalabeling.v1beta1.IBoundingPoly|null); - /** OperatorMetadata labelVotes */ - labelVotes?: (number|null); + /** ObjectTrackingFrame normalizedBoundingPoly */ + normalizedBoundingPoly?: (google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null); - /** OperatorMetadata comments */ - comments?: (string[]|null); + /** ObjectTrackingFrame timeOffset */ + timeOffset?: (google.protobuf.IDuration|null); } - /** Represents an OperatorMetadata. */ - class OperatorMetadata implements IOperatorMetadata { + /** Represents an ObjectTrackingFrame. */ + class ObjectTrackingFrame implements IObjectTrackingFrame { /** - * Constructs a new OperatorMetadata. + * Constructs a new ObjectTrackingFrame. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IOperatorMetadata); + constructor(properties?: google.cloud.datalabeling.v1beta1.IObjectTrackingFrame); - /** OperatorMetadata score. */ - public score: number; + /** ObjectTrackingFrame boundingPoly. */ + public boundingPoly?: (google.cloud.datalabeling.v1beta1.IBoundingPoly|null); - /** OperatorMetadata totalVotes. */ - public totalVotes: number; + /** ObjectTrackingFrame normalizedBoundingPoly. */ + public normalizedBoundingPoly?: (google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null); - /** OperatorMetadata labelVotes. */ - public labelVotes: number; + /** ObjectTrackingFrame timeOffset. */ + public timeOffset?: (google.protobuf.IDuration|null); - /** OperatorMetadata comments. */ - public comments: string[]; + /** ObjectTrackingFrame boundedArea. */ + public boundedArea?: ("boundingPoly"|"normalizedBoundingPoly"); /** - * Creates a new OperatorMetadata instance using the specified properties. + * Creates a new ObjectTrackingFrame instance using the specified properties. * @param [properties] Properties to set - * @returns OperatorMetadata instance + * @returns ObjectTrackingFrame instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IOperatorMetadata): google.cloud.datalabeling.v1beta1.OperatorMetadata; + public static create(properties?: google.cloud.datalabeling.v1beta1.IObjectTrackingFrame): google.cloud.datalabeling.v1beta1.ObjectTrackingFrame; /** - * Encodes the specified OperatorMetadata message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.OperatorMetadata.verify|verify} messages. - * @param message OperatorMetadata message or plain object to encode + * Encodes the specified ObjectTrackingFrame message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.verify|verify} messages. + * @param message ObjectTrackingFrame message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IOperatorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IObjectTrackingFrame, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified OperatorMetadata message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.OperatorMetadata.verify|verify} messages. - * @param message OperatorMetadata message or plain object to encode + * Encodes the specified ObjectTrackingFrame message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.verify|verify} messages. + * @param message ObjectTrackingFrame message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IOperatorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IObjectTrackingFrame, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an OperatorMetadata message from the specified reader or buffer. + * Decodes an ObjectTrackingFrame message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns OperatorMetadata + * @returns ObjectTrackingFrame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.OperatorMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ObjectTrackingFrame; /** - * Decodes an OperatorMetadata message from the specified reader or buffer, length delimited. + * Decodes an ObjectTrackingFrame message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns OperatorMetadata + * @returns ObjectTrackingFrame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.OperatorMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ObjectTrackingFrame; /** - * Verifies an OperatorMetadata message. + * Verifies an ObjectTrackingFrame message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an OperatorMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ObjectTrackingFrame message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OperatorMetadata + * @returns ObjectTrackingFrame */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.OperatorMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ObjectTrackingFrame; /** - * Creates a plain object from an OperatorMetadata message. Also converts values to other types if specified. - * @param message OperatorMetadata + * Creates a plain object from an ObjectTrackingFrame message. Also converts values to other types if specified. + * @param message ObjectTrackingFrame * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.OperatorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.ObjectTrackingFrame, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OperatorMetadata to JSON. + * Converts this ObjectTrackingFrame to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of an ImagePayload. */ - interface IImagePayload { - - /** ImagePayload mimeType */ - mimeType?: (string|null); + /** Properties of a VideoObjectTrackingAnnotation. */ + interface IVideoObjectTrackingAnnotation { - /** ImagePayload imageThumbnail */ - imageThumbnail?: (Uint8Array|string|null); + /** VideoObjectTrackingAnnotation annotationSpec */ + annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); - /** ImagePayload imageUri */ - imageUri?: (string|null); + /** VideoObjectTrackingAnnotation timeSegment */ + timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); - /** ImagePayload signedUri */ - signedUri?: (string|null); + /** VideoObjectTrackingAnnotation objectTrackingFrames */ + objectTrackingFrames?: (google.cloud.datalabeling.v1beta1.IObjectTrackingFrame[]|null); } - /** Represents an ImagePayload. */ - class ImagePayload implements IImagePayload { + /** Represents a VideoObjectTrackingAnnotation. */ + class VideoObjectTrackingAnnotation implements IVideoObjectTrackingAnnotation { /** - * Constructs a new ImagePayload. + * Constructs a new VideoObjectTrackingAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IImagePayload); - - /** ImagePayload mimeType. */ - public mimeType: string; + constructor(properties?: google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation); - /** ImagePayload imageThumbnail. */ - public imageThumbnail: (Uint8Array|string); + /** VideoObjectTrackingAnnotation annotationSpec. */ + public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); - /** ImagePayload imageUri. */ - public imageUri: string; + /** VideoObjectTrackingAnnotation timeSegment. */ + public timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); - /** ImagePayload signedUri. */ - public signedUri: string; + /** VideoObjectTrackingAnnotation objectTrackingFrames. */ + public objectTrackingFrames: google.cloud.datalabeling.v1beta1.IObjectTrackingFrame[]; /** - * Creates a new ImagePayload instance using the specified properties. + * Creates a new VideoObjectTrackingAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns ImagePayload instance + * @returns VideoObjectTrackingAnnotation instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IImagePayload): google.cloud.datalabeling.v1beta1.ImagePayload; + public static create(properties?: google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation): google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation; /** - * Encodes the specified ImagePayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePayload.verify|verify} messages. - * @param message ImagePayload message or plain object to encode + * Encodes the specified VideoObjectTrackingAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. + * @param message VideoObjectTrackingAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IImagePayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ImagePayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePayload.verify|verify} messages. - * @param message ImagePayload message or plain object to encode + * Encodes the specified VideoObjectTrackingAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. + * @param message VideoObjectTrackingAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IImagePayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an ImagePayload message from the specified reader or buffer. + * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ImagePayload + * @returns VideoObjectTrackingAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.ImagePayload; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation; /** - * Decodes an ImagePayload message from the specified reader or buffer, length delimited. + * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ImagePayload + * @returns VideoObjectTrackingAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.ImagePayload; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation; /** - * Verifies an ImagePayload message. + * Verifies a VideoObjectTrackingAnnotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an ImagePayload message from a plain object. Also converts values to their respective internal types. + * Creates a VideoObjectTrackingAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ImagePayload + * @returns VideoObjectTrackingAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.ImagePayload; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation; /** - * Creates a plain object from an ImagePayload message. Also converts values to other types if specified. - * @param message ImagePayload + * Creates a plain object from a VideoObjectTrackingAnnotation message. Also converts values to other types if specified. + * @param message VideoObjectTrackingAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.ImagePayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ImagePayload to JSON. + * Converts this VideoObjectTrackingAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a TextPayload. */ - interface ITextPayload { + /** Properties of a VideoEventAnnotation. */ + interface IVideoEventAnnotation { - /** TextPayload textContent */ - textContent?: (string|null); + /** VideoEventAnnotation annotationSpec */ + annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + + /** VideoEventAnnotation timeSegment */ + timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); } - /** Represents a TextPayload. */ - class TextPayload implements ITextPayload { + /** Represents a VideoEventAnnotation. */ + class VideoEventAnnotation implements IVideoEventAnnotation { /** - * Constructs a new TextPayload. + * Constructs a new VideoEventAnnotation. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.ITextPayload); + constructor(properties?: google.cloud.datalabeling.v1beta1.IVideoEventAnnotation); - /** TextPayload textContent. */ - public textContent: string; + /** VideoEventAnnotation annotationSpec. */ + public annotationSpec?: (google.cloud.datalabeling.v1beta1.IAnnotationSpec|null); + + /** VideoEventAnnotation timeSegment. */ + public timeSegment?: (google.cloud.datalabeling.v1beta1.ITimeSegment|null); /** - * Creates a new TextPayload instance using the specified properties. + * Creates a new VideoEventAnnotation instance using the specified properties. * @param [properties] Properties to set - * @returns TextPayload instance + * @returns VideoEventAnnotation instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.ITextPayload): google.cloud.datalabeling.v1beta1.TextPayload; + public static create(properties?: google.cloud.datalabeling.v1beta1.IVideoEventAnnotation): google.cloud.datalabeling.v1beta1.VideoEventAnnotation; /** - * Encodes the specified TextPayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextPayload.verify|verify} messages. - * @param message TextPayload message or plain object to encode + * Encodes the specified VideoEventAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoEventAnnotation.verify|verify} messages. + * @param message VideoEventAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.ITextPayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IVideoEventAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TextPayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextPayload.verify|verify} messages. - * @param message TextPayload message or plain object to encode + * Encodes the specified VideoEventAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoEventAnnotation.verify|verify} messages. + * @param message VideoEventAnnotation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.ITextPayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVideoEventAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TextPayload message from the specified reader or buffer. + * Decodes a VideoEventAnnotation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TextPayload + * @returns VideoEventAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.TextPayload; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.VideoEventAnnotation; /** - * Decodes a TextPayload message from the specified reader or buffer, length delimited. + * Decodes a VideoEventAnnotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TextPayload + * @returns VideoEventAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.TextPayload; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.VideoEventAnnotation; /** - * Verifies a TextPayload message. + * Verifies a VideoEventAnnotation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TextPayload message from a plain object. Also converts values to their respective internal types. + * Creates a VideoEventAnnotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TextPayload + * @returns VideoEventAnnotation */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.TextPayload; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.VideoEventAnnotation; /** - * Creates a plain object from a TextPayload message. Also converts values to other types if specified. - * @param message TextPayload + * Creates a plain object from a VideoEventAnnotation message. Also converts values to other types if specified. + * @param message VideoEventAnnotation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.TextPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.VideoEventAnnotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TextPayload to JSON. + * Converts this VideoEventAnnotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoThumbnail. */ - interface IVideoThumbnail { - - /** VideoThumbnail thumbnail */ - thumbnail?: (Uint8Array|string|null); + /** Properties of an AnnotationMetadata. */ + interface IAnnotationMetadata { - /** VideoThumbnail timeOffset */ - timeOffset?: (google.protobuf.IDuration|null); + /** AnnotationMetadata operatorMetadata */ + operatorMetadata?: (google.cloud.datalabeling.v1beta1.IOperatorMetadata|null); } - /** Represents a VideoThumbnail. */ - class VideoThumbnail implements IVideoThumbnail { + /** Represents an AnnotationMetadata. */ + class AnnotationMetadata implements IAnnotationMetadata { /** - * Constructs a new VideoThumbnail. + * Constructs a new AnnotationMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IVideoThumbnail); - - /** VideoThumbnail thumbnail. */ - public thumbnail: (Uint8Array|string); + constructor(properties?: google.cloud.datalabeling.v1beta1.IAnnotationMetadata); - /** VideoThumbnail timeOffset. */ - public timeOffset?: (google.protobuf.IDuration|null); + /** AnnotationMetadata operatorMetadata. */ + public operatorMetadata?: (google.cloud.datalabeling.v1beta1.IOperatorMetadata|null); /** - * Creates a new VideoThumbnail instance using the specified properties. + * Creates a new AnnotationMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns VideoThumbnail instance + * @returns AnnotationMetadata instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IVideoThumbnail): google.cloud.datalabeling.v1beta1.VideoThumbnail; + public static create(properties?: google.cloud.datalabeling.v1beta1.IAnnotationMetadata): google.cloud.datalabeling.v1beta1.AnnotationMetadata; /** - * Encodes the specified VideoThumbnail message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoThumbnail.verify|verify} messages. - * @param message VideoThumbnail message or plain object to encode + * Encodes the specified AnnotationMetadata message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationMetadata.verify|verify} messages. + * @param message AnnotationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IVideoThumbnail, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IAnnotationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoThumbnail message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoThumbnail.verify|verify} messages. - * @param message VideoThumbnail message or plain object to encode + * Encodes the specified AnnotationMetadata message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationMetadata.verify|verify} messages. + * @param message AnnotationMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVideoThumbnail, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IAnnotationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoThumbnail message from the specified reader or buffer. + * Decodes an AnnotationMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoThumbnail + * @returns AnnotationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.VideoThumbnail; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.AnnotationMetadata; /** - * Decodes a VideoThumbnail message from the specified reader or buffer, length delimited. + * Decodes an AnnotationMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoThumbnail + * @returns AnnotationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.VideoThumbnail; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.AnnotationMetadata; /** - * Verifies a VideoThumbnail message. + * Verifies an AnnotationMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VideoThumbnail message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoThumbnail + * @returns AnnotationMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.VideoThumbnail; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.AnnotationMetadata; /** - * Creates a plain object from a VideoThumbnail message. Also converts values to other types if specified. - * @param message VideoThumbnail + * Creates a plain object from an AnnotationMetadata message. Also converts values to other types if specified. + * @param message AnnotationMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.VideoThumbnail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.AnnotationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoThumbnail to JSON. + * Converts this AnnotationMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a VideoPayload. */ - interface IVideoPayload { - - /** VideoPayload mimeType */ - mimeType?: (string|null); + /** Properties of an OperatorMetadata. */ + interface IOperatorMetadata { - /** VideoPayload videoUri */ - videoUri?: (string|null); + /** OperatorMetadata score */ + score?: (number|null); - /** VideoPayload videoThumbnails */ - videoThumbnails?: (google.cloud.datalabeling.v1beta1.IVideoThumbnail[]|null); + /** OperatorMetadata totalVotes */ + totalVotes?: (number|null); - /** VideoPayload frameRate */ - frameRate?: (number|null); + /** OperatorMetadata labelVotes */ + labelVotes?: (number|null); - /** VideoPayload signedUri */ - signedUri?: (string|null); + /** OperatorMetadata comments */ + comments?: (string[]|null); } - /** Represents a VideoPayload. */ - class VideoPayload implements IVideoPayload { + /** Represents an OperatorMetadata. */ + class OperatorMetadata implements IOperatorMetadata { /** - * Constructs a new VideoPayload. + * Constructs a new OperatorMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.datalabeling.v1beta1.IVideoPayload); - - /** VideoPayload mimeType. */ - public mimeType: string; + constructor(properties?: google.cloud.datalabeling.v1beta1.IOperatorMetadata); - /** VideoPayload videoUri. */ - public videoUri: string; + /** OperatorMetadata score. */ + public score: number; - /** VideoPayload videoThumbnails. */ - public videoThumbnails: google.cloud.datalabeling.v1beta1.IVideoThumbnail[]; + /** OperatorMetadata totalVotes. */ + public totalVotes: number; - /** VideoPayload frameRate. */ - public frameRate: number; + /** OperatorMetadata labelVotes. */ + public labelVotes: number; - /** VideoPayload signedUri. */ - public signedUri: string; + /** OperatorMetadata comments. */ + public comments: string[]; /** - * Creates a new VideoPayload instance using the specified properties. + * Creates a new OperatorMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns VideoPayload instance + * @returns OperatorMetadata instance */ - public static create(properties?: google.cloud.datalabeling.v1beta1.IVideoPayload): google.cloud.datalabeling.v1beta1.VideoPayload; + public static create(properties?: google.cloud.datalabeling.v1beta1.IOperatorMetadata): google.cloud.datalabeling.v1beta1.OperatorMetadata; /** - * Encodes the specified VideoPayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoPayload.verify|verify} messages. - * @param message VideoPayload message or plain object to encode + * Encodes the specified OperatorMetadata message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.OperatorMetadata.verify|verify} messages. + * @param message OperatorMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.datalabeling.v1beta1.IVideoPayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.datalabeling.v1beta1.IOperatorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified VideoPayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoPayload.verify|verify} messages. - * @param message VideoPayload message or plain object to encode + * Encodes the specified OperatorMetadata message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.OperatorMetadata.verify|verify} messages. + * @param message OperatorMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IVideoPayload, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.datalabeling.v1beta1.IOperatorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a VideoPayload message from the specified reader or buffer. + * Decodes an OperatorMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns VideoPayload + * @returns OperatorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.VideoPayload; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.datalabeling.v1beta1.OperatorMetadata; /** - * Decodes a VideoPayload message from the specified reader or buffer, length delimited. + * Decodes an OperatorMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns VideoPayload + * @returns OperatorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.VideoPayload; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.datalabeling.v1beta1.OperatorMetadata; /** - * Verifies a VideoPayload message. + * Verifies an OperatorMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a VideoPayload message from a plain object. Also converts values to their respective internal types. + * Creates an OperatorMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns VideoPayload + * @returns OperatorMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.VideoPayload; + public static fromObject(object: { [k: string]: any }): google.cloud.datalabeling.v1beta1.OperatorMetadata; /** - * Creates a plain object from a VideoPayload message. Also converts values to other types if specified. - * @param message VideoPayload + * Creates a plain object from an OperatorMetadata message. Also converts values to other types if specified. + * @param message OperatorMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.datalabeling.v1beta1.VideoPayload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.datalabeling.v1beta1.OperatorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this VideoPayload to JSON. + * Converts this OperatorMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/protos/protos.js b/protos/protos.js index fc53941..dfb1217 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -66,30 +66,27 @@ */ var v1beta1 = {}; - v1beta1.AnnotationSpecSet = (function() { + v1beta1.ImagePayload = (function() { /** - * Properties of an AnnotationSpecSet. + * Properties of an ImagePayload. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IAnnotationSpecSet - * @property {string|null} [name] AnnotationSpecSet name - * @property {string|null} [displayName] AnnotationSpecSet displayName - * @property {string|null} [description] AnnotationSpecSet description - * @property {Array.|null} [annotationSpecs] AnnotationSpecSet annotationSpecs - * @property {Array.|null} [blockingResources] AnnotationSpecSet blockingResources + * @interface IImagePayload + * @property {string|null} [mimeType] ImagePayload mimeType + * @property {Uint8Array|null} [imageThumbnail] ImagePayload imageThumbnail + * @property {string|null} [imageUri] ImagePayload imageUri + * @property {string|null} [signedUri] ImagePayload signedUri */ /** - * Constructs a new AnnotationSpecSet. + * Constructs a new ImagePayload. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an AnnotationSpecSet. - * @implements IAnnotationSpecSet + * @classdesc Represents an ImagePayload. + * @implements IImagePayload * @constructor - * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpecSet=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IImagePayload=} [properties] Properties to set */ - function AnnotationSpecSet(properties) { - this.annotationSpecs = []; - this.blockingResources = []; + function ImagePayload(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -97,133 +94,114 @@ } /** - * AnnotationSpecSet name. - * @member {string} name - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet - * @instance - */ - AnnotationSpecSet.prototype.name = ""; - - /** - * AnnotationSpecSet displayName. - * @member {string} displayName - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * ImagePayload mimeType. + * @member {string} mimeType + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @instance */ - AnnotationSpecSet.prototype.displayName = ""; + ImagePayload.prototype.mimeType = ""; /** - * AnnotationSpecSet description. - * @member {string} description - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * ImagePayload imageThumbnail. + * @member {Uint8Array} imageThumbnail + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @instance */ - AnnotationSpecSet.prototype.description = ""; + ImagePayload.prototype.imageThumbnail = $util.newBuffer([]); /** - * AnnotationSpecSet annotationSpecs. - * @member {Array.} annotationSpecs - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * ImagePayload imageUri. + * @member {string} imageUri + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @instance */ - AnnotationSpecSet.prototype.annotationSpecs = $util.emptyArray; + ImagePayload.prototype.imageUri = ""; /** - * AnnotationSpecSet blockingResources. - * @member {Array.} blockingResources - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * ImagePayload signedUri. + * @member {string} signedUri + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @instance */ - AnnotationSpecSet.prototype.blockingResources = $util.emptyArray; + ImagePayload.prototype.signedUri = ""; /** - * Creates a new AnnotationSpecSet instance using the specified properties. + * Creates a new ImagePayload instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpecSet=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpecSet} AnnotationSpecSet instance + * @param {google.cloud.datalabeling.v1beta1.IImagePayload=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.ImagePayload} ImagePayload instance */ - AnnotationSpecSet.create = function create(properties) { - return new AnnotationSpecSet(properties); + ImagePayload.create = function create(properties) { + return new ImagePayload(properties); }; /** - * Encodes the specified AnnotationSpecSet message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpecSet.verify|verify} messages. + * Encodes the specified ImagePayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePayload.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpecSet} message AnnotationSpecSet message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IImagePayload} message ImagePayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationSpecSet.encode = function encode(message, writer) { + ImagePayload.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.annotationSpecs != null && message.annotationSpecs.length) - for (var i = 0; i < message.annotationSpecs.length; ++i) - $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpecs[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.blockingResources != null && message.blockingResources.length) - for (var i = 0; i < message.blockingResources.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.blockingResources[i]); + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.imageThumbnail != null && message.hasOwnProperty("imageThumbnail")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.imageThumbnail); + if (message.imageUri != null && message.hasOwnProperty("imageUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.imageUri); + if (message.signedUri != null && message.hasOwnProperty("signedUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.signedUri); return writer; }; /** - * Encodes the specified AnnotationSpecSet message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpecSet.verify|verify} messages. + * Encodes the specified ImagePayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePayload.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpecSet} message AnnotationSpecSet message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IImagePayload} message ImagePayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationSpecSet.encodeDelimited = function encodeDelimited(message, writer) { + ImagePayload.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotationSpecSet message from the specified reader or buffer. + * Decodes an ImagePayload message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpecSet} AnnotationSpecSet + * @returns {google.cloud.datalabeling.v1beta1.ImagePayload} ImagePayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationSpecSet.decode = function decode(reader, length) { + ImagePayload.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.AnnotationSpecSet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ImagePayload(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.mimeType = reader.string(); break; case 2: - message.displayName = reader.string(); + message.imageThumbnail = reader.bytes(); break; case 3: - message.description = reader.string(); + message.imageUri = reader.string(); break; case 4: - if (!(message.annotationSpecs && message.annotationSpecs.length)) - message.annotationSpecs = []; - message.annotationSpecs.push($root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.blockingResources && message.blockingResources.length)) - message.blockingResources = []; - message.blockingResources.push(reader.string()); + message.signedUri = reader.string(); break; default: reader.skipType(tag & 7); @@ -234,172 +212,141 @@ }; /** - * Decodes an AnnotationSpecSet message from the specified reader or buffer, length delimited. + * Decodes an ImagePayload message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpecSet} AnnotationSpecSet + * @returns {google.cloud.datalabeling.v1beta1.ImagePayload} ImagePayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationSpecSet.decodeDelimited = function decodeDelimited(reader) { + ImagePayload.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnnotationSpecSet message. + * Verifies an ImagePayload message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnnotationSpecSet.verify = function verify(message) { + ImagePayload.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.annotationSpecs != null && message.hasOwnProperty("annotationSpecs")) { - if (!Array.isArray(message.annotationSpecs)) - return "annotationSpecs: array expected"; - for (var i = 0; i < message.annotationSpecs.length; ++i) { - var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpecs[i]); - if (error) - return "annotationSpecs." + error; - } - } - if (message.blockingResources != null && message.hasOwnProperty("blockingResources")) { - if (!Array.isArray(message.blockingResources)) - return "blockingResources: array expected"; - for (var i = 0; i < message.blockingResources.length; ++i) - if (!$util.isString(message.blockingResources[i])) - return "blockingResources: string[] expected"; - } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.imageThumbnail != null && message.hasOwnProperty("imageThumbnail")) + if (!(message.imageThumbnail && typeof message.imageThumbnail.length === "number" || $util.isString(message.imageThumbnail))) + return "imageThumbnail: buffer expected"; + if (message.imageUri != null && message.hasOwnProperty("imageUri")) + if (!$util.isString(message.imageUri)) + return "imageUri: string expected"; + if (message.signedUri != null && message.hasOwnProperty("signedUri")) + if (!$util.isString(message.signedUri)) + return "signedUri: string expected"; return null; }; /** - * Creates an AnnotationSpecSet message from a plain object. Also converts values to their respective internal types. + * Creates an ImagePayload message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpecSet} AnnotationSpecSet + * @returns {google.cloud.datalabeling.v1beta1.ImagePayload} ImagePayload */ - AnnotationSpecSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.AnnotationSpecSet) + ImagePayload.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.ImagePayload) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.AnnotationSpecSet(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); - if (object.annotationSpecs) { - if (!Array.isArray(object.annotationSpecs)) - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationSpecSet.annotationSpecs: array expected"); - message.annotationSpecs = []; - for (var i = 0; i < object.annotationSpecs.length; ++i) { - if (typeof object.annotationSpecs[i] !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationSpecSet.annotationSpecs: object expected"); - message.annotationSpecs[i] = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpecs[i]); - } - } - if (object.blockingResources) { - if (!Array.isArray(object.blockingResources)) - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationSpecSet.blockingResources: array expected"); - message.blockingResources = []; - for (var i = 0; i < object.blockingResources.length; ++i) - message.blockingResources[i] = String(object.blockingResources[i]); - } + var message = new $root.google.cloud.datalabeling.v1beta1.ImagePayload(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.imageThumbnail != null) + if (typeof object.imageThumbnail === "string") + $util.base64.decode(object.imageThumbnail, message.imageThumbnail = $util.newBuffer($util.base64.length(object.imageThumbnail)), 0); + else if (object.imageThumbnail.length) + message.imageThumbnail = object.imageThumbnail; + if (object.imageUri != null) + message.imageUri = String(object.imageUri); + if (object.signedUri != null) + message.signedUri = String(object.signedUri); return message; }; /** - * Creates a plain object from an AnnotationSpecSet message. Also converts values to other types if specified. + * Creates a plain object from an ImagePayload message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @static - * @param {google.cloud.datalabeling.v1beta1.AnnotationSpecSet} message AnnotationSpecSet + * @param {google.cloud.datalabeling.v1beta1.ImagePayload} message ImagePayload * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnnotationSpecSet.toObject = function toObject(message, options) { + ImagePayload.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.annotationSpecs = []; - object.blockingResources = []; - } if (options.defaults) { - object.name = ""; - object.displayName = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.annotationSpecs && message.annotationSpecs.length) { - object.annotationSpecs = []; - for (var j = 0; j < message.annotationSpecs.length; ++j) - object.annotationSpecs[j] = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpecs[j], options); - } - if (message.blockingResources && message.blockingResources.length) { - object.blockingResources = []; - for (var j = 0; j < message.blockingResources.length; ++j) - object.blockingResources[j] = message.blockingResources[j]; + object.mimeType = ""; + if (options.bytes === String) + object.imageThumbnail = ""; + else { + object.imageThumbnail = []; + if (options.bytes !== Array) + object.imageThumbnail = $util.newBuffer(object.imageThumbnail); + } + object.imageUri = ""; + object.signedUri = ""; } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.imageThumbnail != null && message.hasOwnProperty("imageThumbnail")) + object.imageThumbnail = options.bytes === String ? $util.base64.encode(message.imageThumbnail, 0, message.imageThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.imageThumbnail) : message.imageThumbnail; + if (message.imageUri != null && message.hasOwnProperty("imageUri")) + object.imageUri = message.imageUri; + if (message.signedUri != null && message.hasOwnProperty("signedUri")) + object.signedUri = message.signedUri; return object; }; /** - * Converts this AnnotationSpecSet to JSON. + * Converts this ImagePayload to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @memberof google.cloud.datalabeling.v1beta1.ImagePayload * @instance * @returns {Object.} JSON object */ - AnnotationSpecSet.prototype.toJSON = function toJSON() { + ImagePayload.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AnnotationSpecSet; + return ImagePayload; })(); - v1beta1.AnnotationSpec = (function() { + v1beta1.TextPayload = (function() { /** - * Properties of an AnnotationSpec. + * Properties of a TextPayload. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IAnnotationSpec - * @property {string|null} [displayName] AnnotationSpec displayName - * @property {string|null} [description] AnnotationSpec description + * @interface ITextPayload + * @property {string|null} [textContent] TextPayload textContent */ /** - * Constructs a new AnnotationSpec. + * Constructs a new TextPayload. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an AnnotationSpec. - * @implements IAnnotationSpec + * @classdesc Represents a TextPayload. + * @implements ITextPayload * @constructor - * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpec=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.ITextPayload=} [properties] Properties to set */ - function AnnotationSpec(properties) { + function TextPayload(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -407,88 +354,75 @@ } /** - * AnnotationSpec displayName. - * @member {string} displayName - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec - * @instance - */ - AnnotationSpec.prototype.displayName = ""; - - /** - * AnnotationSpec description. - * @member {string} description - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec + * TextPayload textContent. + * @member {string} textContent + * @memberof google.cloud.datalabeling.v1beta1.TextPayload * @instance */ - AnnotationSpec.prototype.description = ""; + TextPayload.prototype.textContent = ""; /** - * Creates a new AnnotationSpec instance using the specified properties. + * Creates a new TextPayload instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec + * @memberof google.cloud.datalabeling.v1beta1.TextPayload * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpec=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpec} AnnotationSpec instance + * @param {google.cloud.datalabeling.v1beta1.ITextPayload=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.TextPayload} TextPayload instance */ - AnnotationSpec.create = function create(properties) { - return new AnnotationSpec(properties); + TextPayload.create = function create(properties) { + return new TextPayload(properties); }; /** - * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpec.verify|verify} messages. + * Encodes the specified TextPayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextPayload.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec + * @memberof google.cloud.datalabeling.v1beta1.TextPayload * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpec} message AnnotationSpec message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.ITextPayload} message TextPayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationSpec.encode = function encode(message, writer) { + TextPayload.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.displayName != null && message.hasOwnProperty("displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.description != null && message.hasOwnProperty("description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.textContent != null && message.hasOwnProperty("textContent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.textContent); return writer; }; /** - * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpec.verify|verify} messages. + * Encodes the specified TextPayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextPayload.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec + * @memberof google.cloud.datalabeling.v1beta1.TextPayload * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpec} message AnnotationSpec message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.ITextPayload} message TextPayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationSpec.encodeDelimited = function encodeDelimited(message, writer) { + TextPayload.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotationSpec message from the specified reader or buffer. + * Decodes a TextPayload message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec + * @memberof google.cloud.datalabeling.v1beta1.TextPayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpec} AnnotationSpec + * @returns {google.cloud.datalabeling.v1beta1.TextPayload} TextPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationSpec.decode = function decode(reader, length) { + TextPayload.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.AnnotationSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.TextPayload(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.displayName = reader.string(); - break; - case 2: - message.description = reader.string(); + message.textContent = reader.string(); break; default: reader.skipType(tag & 7); @@ -499,134 +433,108 @@ }; /** - * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. + * Decodes a TextPayload message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec + * @memberof google.cloud.datalabeling.v1beta1.TextPayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpec} AnnotationSpec + * @returns {google.cloud.datalabeling.v1beta1.TextPayload} TextPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationSpec.decodeDelimited = function decodeDelimited(reader) { + TextPayload.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnnotationSpec message. + * Verifies a TextPayload message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec + * @memberof google.cloud.datalabeling.v1beta1.TextPayload * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnnotationSpec.verify = function verify(message) { + TextPayload.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; + if (message.textContent != null && message.hasOwnProperty("textContent")) + if (!$util.isString(message.textContent)) + return "textContent: string expected"; return null; }; /** - * Creates an AnnotationSpec message from a plain object. Also converts values to their respective internal types. + * Creates a TextPayload message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec + * @memberof google.cloud.datalabeling.v1beta1.TextPayload * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpec} AnnotationSpec + * @returns {google.cloud.datalabeling.v1beta1.TextPayload} TextPayload */ - AnnotationSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.AnnotationSpec) + TextPayload.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.TextPayload) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.AnnotationSpec(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.description != null) - message.description = String(object.description); + var message = new $root.google.cloud.datalabeling.v1beta1.TextPayload(); + if (object.textContent != null) + message.textContent = String(object.textContent); return message; }; /** - * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. + * Creates a plain object from a TextPayload message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec + * @memberof google.cloud.datalabeling.v1beta1.TextPayload * @static - * @param {google.cloud.datalabeling.v1beta1.AnnotationSpec} message AnnotationSpec + * @param {google.cloud.datalabeling.v1beta1.TextPayload} message TextPayload * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnnotationSpec.toObject = function toObject(message, options) { + TextPayload.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.displayName = ""; - object.description = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; + if (options.defaults) + object.textContent = ""; + if (message.textContent != null && message.hasOwnProperty("textContent")) + object.textContent = message.textContent; return object; }; /** - * Converts this AnnotationSpec to JSON. + * Converts this TextPayload to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec + * @memberof google.cloud.datalabeling.v1beta1.TextPayload * @instance * @returns {Object.} JSON object */ - AnnotationSpec.prototype.toJSON = function toJSON() { + TextPayload.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AnnotationSpec; - })(); - - /** - * AnnotationSource enum. - * @name google.cloud.datalabeling.v1beta1.AnnotationSource - * @enum {string} - * @property {number} ANNOTATION_SOURCE_UNSPECIFIED=0 ANNOTATION_SOURCE_UNSPECIFIED value - * @property {number} OPERATOR=3 OPERATOR value - */ - v1beta1.AnnotationSource = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ANNOTATION_SOURCE_UNSPECIFIED"] = 0; - values[valuesById[3] = "OPERATOR"] = 3; - return values; + return TextPayload; })(); - v1beta1.Annotation = (function() { + v1beta1.VideoThumbnail = (function() { /** - * Properties of an Annotation. + * Properties of a VideoThumbnail. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IAnnotation - * @property {string|null} [name] Annotation name - * @property {google.cloud.datalabeling.v1beta1.AnnotationSource|null} [annotationSource] Annotation annotationSource - * @property {google.cloud.datalabeling.v1beta1.IAnnotationValue|null} [annotationValue] Annotation annotationValue - * @property {google.cloud.datalabeling.v1beta1.IAnnotationMetadata|null} [annotationMetadata] Annotation annotationMetadata - * @property {google.cloud.datalabeling.v1beta1.AnnotationSentiment|null} [annotationSentiment] Annotation annotationSentiment + * @interface IVideoThumbnail + * @property {Uint8Array|null} [thumbnail] VideoThumbnail thumbnail + * @property {google.protobuf.IDuration|null} [timeOffset] VideoThumbnail timeOffset */ /** - * Constructs a new Annotation. + * Constructs a new VideoThumbnail. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an Annotation. - * @implements IAnnotation + * @classdesc Represents a VideoThumbnail. + * @implements IVideoThumbnail * @constructor - * @param {google.cloud.datalabeling.v1beta1.IAnnotation=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IVideoThumbnail=} [properties] Properties to set */ - function Annotation(properties) { + function VideoThumbnail(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -634,127 +542,88 @@ } /** - * Annotation name. - * @member {string} name - * @memberof google.cloud.datalabeling.v1beta1.Annotation + * VideoThumbnail thumbnail. + * @member {Uint8Array} thumbnail + * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail * @instance */ - Annotation.prototype.name = ""; + VideoThumbnail.prototype.thumbnail = $util.newBuffer([]); /** - * Annotation annotationSource. - * @member {google.cloud.datalabeling.v1beta1.AnnotationSource} annotationSource - * @memberof google.cloud.datalabeling.v1beta1.Annotation + * VideoThumbnail timeOffset. + * @member {google.protobuf.IDuration|null|undefined} timeOffset + * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail * @instance */ - Annotation.prototype.annotationSource = 0; + VideoThumbnail.prototype.timeOffset = null; /** - * Annotation annotationValue. - * @member {google.cloud.datalabeling.v1beta1.IAnnotationValue|null|undefined} annotationValue - * @memberof google.cloud.datalabeling.v1beta1.Annotation - * @instance + * Creates a new VideoThumbnail instance using the specified properties. + * @function create + * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail + * @static + * @param {google.cloud.datalabeling.v1beta1.IVideoThumbnail=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.VideoThumbnail} VideoThumbnail instance */ - Annotation.prototype.annotationValue = null; - - /** - * Annotation annotationMetadata. - * @member {google.cloud.datalabeling.v1beta1.IAnnotationMetadata|null|undefined} annotationMetadata - * @memberof google.cloud.datalabeling.v1beta1.Annotation - * @instance - */ - Annotation.prototype.annotationMetadata = null; - - /** - * Annotation annotationSentiment. - * @member {google.cloud.datalabeling.v1beta1.AnnotationSentiment} annotationSentiment - * @memberof google.cloud.datalabeling.v1beta1.Annotation - * @instance - */ - Annotation.prototype.annotationSentiment = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.cloud.datalabeling.v1beta1.Annotation - * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotation=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); + VideoThumbnail.create = function create(properties) { + return new VideoThumbnail(properties); }; /** - * Encodes the specified Annotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Annotation.verify|verify} messages. + * Encodes the specified VideoThumbnail message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoThumbnail.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.Annotation + * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotation} message Annotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVideoThumbnail} message VideoThumbnail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Annotation.encode = function encode(message, writer) { + VideoThumbnail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.annotationSource != null && message.hasOwnProperty("annotationSource")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.annotationSource); - if (message.annotationValue != null && message.hasOwnProperty("annotationValue")) - $root.google.cloud.datalabeling.v1beta1.AnnotationValue.encode(message.annotationValue, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.annotationMetadata != null && message.hasOwnProperty("annotationMetadata")) - $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata.encode(message.annotationMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.annotationSentiment != null && message.hasOwnProperty("annotationSentiment")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.annotationSentiment); + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.thumbnail); + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) + $root.google.protobuf.Duration.encode(message.timeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Annotation.verify|verify} messages. + * Encodes the specified VideoThumbnail message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoThumbnail.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.Annotation + * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotation} message Annotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVideoThumbnail} message VideoThumbnail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { + VideoThumbnail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Annotation message from the specified reader or buffer. + * Decodes a VideoThumbnail message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.Annotation + * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.Annotation} Annotation + * @returns {google.cloud.datalabeling.v1beta1.VideoThumbnail} VideoThumbnail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Annotation.decode = function decode(reader, length) { + VideoThumbnail.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.Annotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.VideoThumbnail(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.thumbnail = reader.bytes(); break; case 2: - message.annotationSource = reader.int32(); - break; - case 3: - message.annotationValue = $root.google.cloud.datalabeling.v1beta1.AnnotationValue.decode(reader, reader.uint32()); - break; - case 4: - message.annotationMetadata = $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata.decode(reader, reader.uint32()); - break; - case 6: - message.annotationSentiment = reader.int32(); + message.timeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -765,243 +634,135 @@ }; /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. + * Decodes a VideoThumbnail message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.Annotation + * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.Annotation} Annotation + * @returns {google.cloud.datalabeling.v1beta1.VideoThumbnail} VideoThumbnail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Annotation.decodeDelimited = function decodeDelimited(reader) { + VideoThumbnail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Annotation message. + * Verifies a VideoThumbnail message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.Annotation + * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Annotation.verify = function verify(message) { + VideoThumbnail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.annotationSource != null && message.hasOwnProperty("annotationSource")) - switch (message.annotationSource) { - default: - return "annotationSource: enum value expected"; - case 0: - case 3: - break; - } - if (message.annotationValue != null && message.hasOwnProperty("annotationValue")) { - var error = $root.google.cloud.datalabeling.v1beta1.AnnotationValue.verify(message.annotationValue); - if (error) - return "annotationValue." + error; - } - if (message.annotationMetadata != null && message.hasOwnProperty("annotationMetadata")) { - var error = $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata.verify(message.annotationMetadata); + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail))) + return "thumbnail: buffer expected"; + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.timeOffset); if (error) - return "annotationMetadata." + error; + return "timeOffset." + error; } - if (message.annotationSentiment != null && message.hasOwnProperty("annotationSentiment")) - switch (message.annotationSentiment) { - default: - return "annotationSentiment: enum value expected"; - case 0: - case 1: - case 2: - break; - } return null; }; /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * Creates a VideoThumbnail message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.Annotation + * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.Annotation} Annotation + * @returns {google.cloud.datalabeling.v1beta1.VideoThumbnail} VideoThumbnail */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.Annotation) + VideoThumbnail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.VideoThumbnail) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.Annotation(); - if (object.name != null) - message.name = String(object.name); - switch (object.annotationSource) { - case "ANNOTATION_SOURCE_UNSPECIFIED": - case 0: - message.annotationSource = 0; - break; - case "OPERATOR": - case 3: - message.annotationSource = 3; - break; - } - if (object.annotationValue != null) { - if (typeof object.annotationValue !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.Annotation.annotationValue: object expected"); - message.annotationValue = $root.google.cloud.datalabeling.v1beta1.AnnotationValue.fromObject(object.annotationValue); - } - if (object.annotationMetadata != null) { - if (typeof object.annotationMetadata !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.Annotation.annotationMetadata: object expected"); - message.annotationMetadata = $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata.fromObject(object.annotationMetadata); - } - switch (object.annotationSentiment) { - case "ANNOTATION_SENTIMENT_UNSPECIFIED": - case 0: - message.annotationSentiment = 0; - break; - case "NEGATIVE": - case 1: - message.annotationSentiment = 1; - break; - case "POSITIVE": - case 2: - message.annotationSentiment = 2; - break; + var message = new $root.google.cloud.datalabeling.v1beta1.VideoThumbnail(); + if (object.thumbnail != null) + if (typeof object.thumbnail === "string") + $util.base64.decode(object.thumbnail, message.thumbnail = $util.newBuffer($util.base64.length(object.thumbnail)), 0); + else if (object.thumbnail.length) + message.thumbnail = object.thumbnail; + if (object.timeOffset != null) { + if (typeof object.timeOffset !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.VideoThumbnail.timeOffset: object expected"); + message.timeOffset = $root.google.protobuf.Duration.fromObject(object.timeOffset); } return message; }; /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * Creates a plain object from a VideoThumbnail message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.Annotation + * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail * @static - * @param {google.cloud.datalabeling.v1beta1.Annotation} message Annotation + * @param {google.cloud.datalabeling.v1beta1.VideoThumbnail} message VideoThumbnail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Annotation.toObject = function toObject(message, options) { + VideoThumbnail.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.annotationSource = options.enums === String ? "ANNOTATION_SOURCE_UNSPECIFIED" : 0; - object.annotationValue = null; - object.annotationMetadata = null; - object.annotationSentiment = options.enums === String ? "ANNOTATION_SENTIMENT_UNSPECIFIED" : 0; + if (options.bytes === String) + object.thumbnail = ""; + else { + object.thumbnail = []; + if (options.bytes !== Array) + object.thumbnail = $util.newBuffer(object.thumbnail); + } + object.timeOffset = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.annotationSource != null && message.hasOwnProperty("annotationSource")) - object.annotationSource = options.enums === String ? $root.google.cloud.datalabeling.v1beta1.AnnotationSource[message.annotationSource] : message.annotationSource; - if (message.annotationValue != null && message.hasOwnProperty("annotationValue")) - object.annotationValue = $root.google.cloud.datalabeling.v1beta1.AnnotationValue.toObject(message.annotationValue, options); - if (message.annotationMetadata != null && message.hasOwnProperty("annotationMetadata")) - object.annotationMetadata = $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata.toObject(message.annotationMetadata, options); - if (message.annotationSentiment != null && message.hasOwnProperty("annotationSentiment")) - object.annotationSentiment = options.enums === String ? $root.google.cloud.datalabeling.v1beta1.AnnotationSentiment[message.annotationSentiment] : message.annotationSentiment; + if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) + object.thumbnail = options.bytes === String ? $util.base64.encode(message.thumbnail, 0, message.thumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnail) : message.thumbnail; + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) + object.timeOffset = $root.google.protobuf.Duration.toObject(message.timeOffset, options); return object; }; /** - * Converts this Annotation to JSON. + * Converts this VideoThumbnail to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.Annotation + * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail * @instance * @returns {Object.} JSON object */ - Annotation.prototype.toJSON = function toJSON() { + VideoThumbnail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Annotation; + return VideoThumbnail; })(); - /** - * AnnotationSentiment enum. - * @name google.cloud.datalabeling.v1beta1.AnnotationSentiment - * @enum {string} - * @property {number} ANNOTATION_SENTIMENT_UNSPECIFIED=0 ANNOTATION_SENTIMENT_UNSPECIFIED value - * @property {number} NEGATIVE=1 NEGATIVE value - * @property {number} POSITIVE=2 POSITIVE value - */ - v1beta1.AnnotationSentiment = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ANNOTATION_SENTIMENT_UNSPECIFIED"] = 0; - values[valuesById[1] = "NEGATIVE"] = 1; - values[valuesById[2] = "POSITIVE"] = 2; - return values; - })(); - - /** - * AnnotationType enum. - * @name google.cloud.datalabeling.v1beta1.AnnotationType - * @enum {string} - * @property {number} ANNOTATION_TYPE_UNSPECIFIED=0 ANNOTATION_TYPE_UNSPECIFIED value - * @property {number} IMAGE_CLASSIFICATION_ANNOTATION=1 IMAGE_CLASSIFICATION_ANNOTATION value - * @property {number} IMAGE_BOUNDING_BOX_ANNOTATION=2 IMAGE_BOUNDING_BOX_ANNOTATION value - * @property {number} IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION=13 IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION value - * @property {number} IMAGE_BOUNDING_POLY_ANNOTATION=10 IMAGE_BOUNDING_POLY_ANNOTATION value - * @property {number} IMAGE_POLYLINE_ANNOTATION=11 IMAGE_POLYLINE_ANNOTATION value - * @property {number} IMAGE_SEGMENTATION_ANNOTATION=12 IMAGE_SEGMENTATION_ANNOTATION value - * @property {number} VIDEO_SHOTS_CLASSIFICATION_ANNOTATION=3 VIDEO_SHOTS_CLASSIFICATION_ANNOTATION value - * @property {number} VIDEO_OBJECT_TRACKING_ANNOTATION=4 VIDEO_OBJECT_TRACKING_ANNOTATION value - * @property {number} VIDEO_OBJECT_DETECTION_ANNOTATION=5 VIDEO_OBJECT_DETECTION_ANNOTATION value - * @property {number} VIDEO_EVENT_ANNOTATION=6 VIDEO_EVENT_ANNOTATION value - * @property {number} TEXT_CLASSIFICATION_ANNOTATION=8 TEXT_CLASSIFICATION_ANNOTATION value - * @property {number} TEXT_ENTITY_EXTRACTION_ANNOTATION=9 TEXT_ENTITY_EXTRACTION_ANNOTATION value - * @property {number} GENERAL_CLASSIFICATION_ANNOTATION=14 GENERAL_CLASSIFICATION_ANNOTATION value - */ - v1beta1.AnnotationType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ANNOTATION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IMAGE_CLASSIFICATION_ANNOTATION"] = 1; - values[valuesById[2] = "IMAGE_BOUNDING_BOX_ANNOTATION"] = 2; - values[valuesById[13] = "IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION"] = 13; - values[valuesById[10] = "IMAGE_BOUNDING_POLY_ANNOTATION"] = 10; - values[valuesById[11] = "IMAGE_POLYLINE_ANNOTATION"] = 11; - values[valuesById[12] = "IMAGE_SEGMENTATION_ANNOTATION"] = 12; - values[valuesById[3] = "VIDEO_SHOTS_CLASSIFICATION_ANNOTATION"] = 3; - values[valuesById[4] = "VIDEO_OBJECT_TRACKING_ANNOTATION"] = 4; - values[valuesById[5] = "VIDEO_OBJECT_DETECTION_ANNOTATION"] = 5; - values[valuesById[6] = "VIDEO_EVENT_ANNOTATION"] = 6; - values[valuesById[8] = "TEXT_CLASSIFICATION_ANNOTATION"] = 8; - values[valuesById[9] = "TEXT_ENTITY_EXTRACTION_ANNOTATION"] = 9; - values[valuesById[14] = "GENERAL_CLASSIFICATION_ANNOTATION"] = 14; - return values; - })(); - - v1beta1.AnnotationValue = (function() { + v1beta1.VideoPayload = (function() { /** - * Properties of an AnnotationValue. + * Properties of a VideoPayload. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IAnnotationValue - * @property {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation|null} [imageClassificationAnnotation] AnnotationValue imageClassificationAnnotation - * @property {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation|null} [imageBoundingPolyAnnotation] AnnotationValue imageBoundingPolyAnnotation - * @property {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation|null} [imagePolylineAnnotation] AnnotationValue imagePolylineAnnotation - * @property {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation|null} [imageSegmentationAnnotation] AnnotationValue imageSegmentationAnnotation - * @property {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation|null} [textClassificationAnnotation] AnnotationValue textClassificationAnnotation - * @property {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation|null} [textEntityExtractionAnnotation] AnnotationValue textEntityExtractionAnnotation - * @property {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation|null} [videoClassificationAnnotation] AnnotationValue videoClassificationAnnotation - * @property {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation|null} [videoObjectTrackingAnnotation] AnnotationValue videoObjectTrackingAnnotation - * @property {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation|null} [videoEventAnnotation] AnnotationValue videoEventAnnotation + * @interface IVideoPayload + * @property {string|null} [mimeType] VideoPayload mimeType + * @property {string|null} [videoUri] VideoPayload videoUri + * @property {Array.|null} [videoThumbnails] VideoPayload videoThumbnails + * @property {number|null} [frameRate] VideoPayload frameRate + * @property {string|null} [signedUri] VideoPayload signedUri */ /** - * Constructs a new AnnotationValue. + * Constructs a new VideoPayload. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an AnnotationValue. - * @implements IAnnotationValue + * @classdesc Represents a VideoPayload. + * @implements IVideoPayload * @constructor - * @param {google.cloud.datalabeling.v1beta1.IAnnotationValue=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IVideoPayload=} [properties] Properties to set */ - function AnnotationValue(properties) { + function VideoPayload(properties) { + this.videoThumbnails = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1009,193 +770,130 @@ } /** - * AnnotationValue imageClassificationAnnotation. - * @member {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation|null|undefined} imageClassificationAnnotation - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue - * @instance - */ - AnnotationValue.prototype.imageClassificationAnnotation = null; - - /** - * AnnotationValue imageBoundingPolyAnnotation. - * @member {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation|null|undefined} imageBoundingPolyAnnotation - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue - * @instance - */ - AnnotationValue.prototype.imageBoundingPolyAnnotation = null; - - /** - * AnnotationValue imagePolylineAnnotation. - * @member {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation|null|undefined} imagePolylineAnnotation - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue - * @instance - */ - AnnotationValue.prototype.imagePolylineAnnotation = null; - - /** - * AnnotationValue imageSegmentationAnnotation. - * @member {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation|null|undefined} imageSegmentationAnnotation - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue - * @instance - */ - AnnotationValue.prototype.imageSegmentationAnnotation = null; - - /** - * AnnotationValue textClassificationAnnotation. - * @member {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation|null|undefined} textClassificationAnnotation - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue - * @instance - */ - AnnotationValue.prototype.textClassificationAnnotation = null; - - /** - * AnnotationValue textEntityExtractionAnnotation. - * @member {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation|null|undefined} textEntityExtractionAnnotation - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * VideoPayload mimeType. + * @member {string} mimeType + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @instance */ - AnnotationValue.prototype.textEntityExtractionAnnotation = null; + VideoPayload.prototype.mimeType = ""; /** - * AnnotationValue videoClassificationAnnotation. - * @member {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation|null|undefined} videoClassificationAnnotation - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * VideoPayload videoUri. + * @member {string} videoUri + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @instance */ - AnnotationValue.prototype.videoClassificationAnnotation = null; + VideoPayload.prototype.videoUri = ""; /** - * AnnotationValue videoObjectTrackingAnnotation. - * @member {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation|null|undefined} videoObjectTrackingAnnotation - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * VideoPayload videoThumbnails. + * @member {Array.} videoThumbnails + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @instance */ - AnnotationValue.prototype.videoObjectTrackingAnnotation = null; + VideoPayload.prototype.videoThumbnails = $util.emptyArray; /** - * AnnotationValue videoEventAnnotation. - * @member {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation|null|undefined} videoEventAnnotation - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * VideoPayload frameRate. + * @member {number} frameRate + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @instance */ - AnnotationValue.prototype.videoEventAnnotation = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + VideoPayload.prototype.frameRate = 0; /** - * AnnotationValue valueType. - * @member {"imageClassificationAnnotation"|"imageBoundingPolyAnnotation"|"imagePolylineAnnotation"|"imageSegmentationAnnotation"|"textClassificationAnnotation"|"textEntityExtractionAnnotation"|"videoClassificationAnnotation"|"videoObjectTrackingAnnotation"|"videoEventAnnotation"|undefined} valueType - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * VideoPayload signedUri. + * @member {string} signedUri + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @instance */ - Object.defineProperty(AnnotationValue.prototype, "valueType", { - get: $util.oneOfGetter($oneOfFields = ["imageClassificationAnnotation", "imageBoundingPolyAnnotation", "imagePolylineAnnotation", "imageSegmentationAnnotation", "textClassificationAnnotation", "textEntityExtractionAnnotation", "videoClassificationAnnotation", "videoObjectTrackingAnnotation", "videoEventAnnotation"]), - set: $util.oneOfSetter($oneOfFields) - }); + VideoPayload.prototype.signedUri = ""; /** - * Creates a new AnnotationValue instance using the specified properties. + * Creates a new VideoPayload instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationValue=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.AnnotationValue} AnnotationValue instance + * @param {google.cloud.datalabeling.v1beta1.IVideoPayload=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.VideoPayload} VideoPayload instance */ - AnnotationValue.create = function create(properties) { - return new AnnotationValue(properties); + VideoPayload.create = function create(properties) { + return new VideoPayload(properties); }; /** - * Encodes the specified AnnotationValue message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationValue.verify|verify} messages. + * Encodes the specified VideoPayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoPayload.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationValue} message AnnotationValue message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVideoPayload} message VideoPayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationValue.encode = function encode(message, writer) { + VideoPayload.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.imageClassificationAnnotation != null && message.hasOwnProperty("imageClassificationAnnotation")) - $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.encode(message.imageClassificationAnnotation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.imageBoundingPolyAnnotation != null && message.hasOwnProperty("imageBoundingPolyAnnotation")) - $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.encode(message.imageBoundingPolyAnnotation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.textClassificationAnnotation != null && message.hasOwnProperty("textClassificationAnnotation")) - $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.encode(message.textClassificationAnnotation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.videoClassificationAnnotation != null && message.hasOwnProperty("videoClassificationAnnotation")) - $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.encode(message.videoClassificationAnnotation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.videoObjectTrackingAnnotation != null && message.hasOwnProperty("videoObjectTrackingAnnotation")) - $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.encode(message.videoObjectTrackingAnnotation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.videoEventAnnotation != null && message.hasOwnProperty("videoEventAnnotation")) - $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.encode(message.videoEventAnnotation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.imagePolylineAnnotation != null && message.hasOwnProperty("imagePolylineAnnotation")) - $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.encode(message.imagePolylineAnnotation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.imageSegmentationAnnotation != null && message.hasOwnProperty("imageSegmentationAnnotation")) - $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.encode(message.imageSegmentationAnnotation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.textEntityExtractionAnnotation != null && message.hasOwnProperty("textEntityExtractionAnnotation")) - $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.encode(message.textEntityExtractionAnnotation, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); + if (message.videoUri != null && message.hasOwnProperty("videoUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.videoUri); + if (message.videoThumbnails != null && message.videoThumbnails.length) + for (var i = 0; i < message.videoThumbnails.length; ++i) + $root.google.cloud.datalabeling.v1beta1.VideoThumbnail.encode(message.videoThumbnails[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.frameRate != null && message.hasOwnProperty("frameRate")) + writer.uint32(/* id 4, wireType 5 =*/37).float(message.frameRate); + if (message.signedUri != null && message.hasOwnProperty("signedUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.signedUri); return writer; }; /** - * Encodes the specified AnnotationValue message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationValue.verify|verify} messages. + * Encodes the specified VideoPayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoPayload.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationValue} message AnnotationValue message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVideoPayload} message VideoPayload message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationValue.encodeDelimited = function encodeDelimited(message, writer) { + VideoPayload.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotationValue message from the specified reader or buffer. + * Decodes a VideoPayload message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.AnnotationValue} AnnotationValue + * @returns {google.cloud.datalabeling.v1beta1.VideoPayload} VideoPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationValue.decode = function decode(reader, length) { + VideoPayload.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.AnnotationValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.VideoPayload(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.imageClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.decode(reader, reader.uint32()); + message.mimeType = reader.string(); break; case 2: - message.imageBoundingPolyAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.decode(reader, reader.uint32()); - break; - case 8: - message.imagePolylineAnnotation = $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.decode(reader, reader.uint32()); - break; - case 9: - message.imageSegmentationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.decode(reader, reader.uint32()); + message.videoUri = reader.string(); break; case 3: - message.textClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.decode(reader, reader.uint32()); - break; - case 10: - message.textEntityExtractionAnnotation = $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.decode(reader, reader.uint32()); + if (!(message.videoThumbnails && message.videoThumbnails.length)) + message.videoThumbnails = []; + message.videoThumbnails.push($root.google.cloud.datalabeling.v1beta1.VideoThumbnail.decode(reader, reader.uint32())); break; case 4: - message.videoClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.decode(reader, reader.uint32()); + message.frameRate = reader.float(); break; case 5: - message.videoObjectTrackingAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.decode(reader, reader.uint32()); - break; - case 6: - message.videoEventAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.decode(reader, reader.uint32()); + message.signedUri = reader.string(); break; default: reader.skipType(tag & 7); @@ -1206,277 +904,164 @@ }; /** - * Decodes an AnnotationValue message from the specified reader or buffer, length delimited. + * Decodes a VideoPayload message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.AnnotationValue} AnnotationValue + * @returns {google.cloud.datalabeling.v1beta1.VideoPayload} VideoPayload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationValue.decodeDelimited = function decodeDelimited(reader) { + VideoPayload.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnnotationValue message. + * Verifies a VideoPayload message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnnotationValue.verify = function verify(message) { + VideoPayload.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.imageClassificationAnnotation != null && message.hasOwnProperty("imageClassificationAnnotation")) { - properties.valueType = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.verify(message.imageClassificationAnnotation); - if (error) - return "imageClassificationAnnotation." + error; - } - } - if (message.imageBoundingPolyAnnotation != null && message.hasOwnProperty("imageBoundingPolyAnnotation")) { - if (properties.valueType === 1) - return "valueType: multiple values"; - properties.valueType = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.verify(message.imageBoundingPolyAnnotation); - if (error) - return "imageBoundingPolyAnnotation." + error; - } - } - if (message.imagePolylineAnnotation != null && message.hasOwnProperty("imagePolylineAnnotation")) { - if (properties.valueType === 1) - return "valueType: multiple values"; - properties.valueType = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.verify(message.imagePolylineAnnotation); - if (error) - return "imagePolylineAnnotation." + error; - } - } - if (message.imageSegmentationAnnotation != null && message.hasOwnProperty("imageSegmentationAnnotation")) { - if (properties.valueType === 1) - return "valueType: multiple values"; - properties.valueType = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.verify(message.imageSegmentationAnnotation); - if (error) - return "imageSegmentationAnnotation." + error; - } - } - if (message.textClassificationAnnotation != null && message.hasOwnProperty("textClassificationAnnotation")) { - if (properties.valueType === 1) - return "valueType: multiple values"; - properties.valueType = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.verify(message.textClassificationAnnotation); - if (error) - return "textClassificationAnnotation." + error; - } - } - if (message.textEntityExtractionAnnotation != null && message.hasOwnProperty("textEntityExtractionAnnotation")) { - if (properties.valueType === 1) - return "valueType: multiple values"; - properties.valueType = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.verify(message.textEntityExtractionAnnotation); - if (error) - return "textEntityExtractionAnnotation." + error; - } - } - if (message.videoClassificationAnnotation != null && message.hasOwnProperty("videoClassificationAnnotation")) { - if (properties.valueType === 1) - return "valueType: multiple values"; - properties.valueType = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.verify(message.videoClassificationAnnotation); - if (error) - return "videoClassificationAnnotation." + error; - } - } - if (message.videoObjectTrackingAnnotation != null && message.hasOwnProperty("videoObjectTrackingAnnotation")) { - if (properties.valueType === 1) - return "valueType: multiple values"; - properties.valueType = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.verify(message.videoObjectTrackingAnnotation); - if (error) - return "videoObjectTrackingAnnotation." + error; - } - } - if (message.videoEventAnnotation != null && message.hasOwnProperty("videoEventAnnotation")) { - if (properties.valueType === 1) - return "valueType: multiple values"; - properties.valueType = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.verify(message.videoEventAnnotation); + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.videoUri != null && message.hasOwnProperty("videoUri")) + if (!$util.isString(message.videoUri)) + return "videoUri: string expected"; + if (message.videoThumbnails != null && message.hasOwnProperty("videoThumbnails")) { + if (!Array.isArray(message.videoThumbnails)) + return "videoThumbnails: array expected"; + for (var i = 0; i < message.videoThumbnails.length; ++i) { + var error = $root.google.cloud.datalabeling.v1beta1.VideoThumbnail.verify(message.videoThumbnails[i]); if (error) - return "videoEventAnnotation." + error; + return "videoThumbnails." + error; } } + if (message.frameRate != null && message.hasOwnProperty("frameRate")) + if (typeof message.frameRate !== "number") + return "frameRate: number expected"; + if (message.signedUri != null && message.hasOwnProperty("signedUri")) + if (!$util.isString(message.signedUri)) + return "signedUri: string expected"; return null; }; /** - * Creates an AnnotationValue message from a plain object. Also converts values to their respective internal types. + * Creates a VideoPayload message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.AnnotationValue} AnnotationValue + * @returns {google.cloud.datalabeling.v1beta1.VideoPayload} VideoPayload */ - AnnotationValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.AnnotationValue) + VideoPayload.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.VideoPayload) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.AnnotationValue(); - if (object.imageClassificationAnnotation != null) { - if (typeof object.imageClassificationAnnotation !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.imageClassificationAnnotation: object expected"); - message.imageClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.fromObject(object.imageClassificationAnnotation); - } - if (object.imageBoundingPolyAnnotation != null) { - if (typeof object.imageBoundingPolyAnnotation !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.imageBoundingPolyAnnotation: object expected"); - message.imageBoundingPolyAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.fromObject(object.imageBoundingPolyAnnotation); - } - if (object.imagePolylineAnnotation != null) { - if (typeof object.imagePolylineAnnotation !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.imagePolylineAnnotation: object expected"); - message.imagePolylineAnnotation = $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.fromObject(object.imagePolylineAnnotation); - } - if (object.imageSegmentationAnnotation != null) { - if (typeof object.imageSegmentationAnnotation !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.imageSegmentationAnnotation: object expected"); - message.imageSegmentationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.fromObject(object.imageSegmentationAnnotation); - } - if (object.textClassificationAnnotation != null) { - if (typeof object.textClassificationAnnotation !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.textClassificationAnnotation: object expected"); - message.textClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.fromObject(object.textClassificationAnnotation); - } - if (object.textEntityExtractionAnnotation != null) { - if (typeof object.textEntityExtractionAnnotation !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.textEntityExtractionAnnotation: object expected"); - message.textEntityExtractionAnnotation = $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.fromObject(object.textEntityExtractionAnnotation); - } - if (object.videoClassificationAnnotation != null) { - if (typeof object.videoClassificationAnnotation !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.videoClassificationAnnotation: object expected"); - message.videoClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.fromObject(object.videoClassificationAnnotation); - } - if (object.videoObjectTrackingAnnotation != null) { - if (typeof object.videoObjectTrackingAnnotation !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.videoObjectTrackingAnnotation: object expected"); - message.videoObjectTrackingAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.fromObject(object.videoObjectTrackingAnnotation); - } - if (object.videoEventAnnotation != null) { - if (typeof object.videoEventAnnotation !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.videoEventAnnotation: object expected"); - message.videoEventAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.fromObject(object.videoEventAnnotation); + var message = new $root.google.cloud.datalabeling.v1beta1.VideoPayload(); + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.videoUri != null) + message.videoUri = String(object.videoUri); + if (object.videoThumbnails) { + if (!Array.isArray(object.videoThumbnails)) + throw TypeError(".google.cloud.datalabeling.v1beta1.VideoPayload.videoThumbnails: array expected"); + message.videoThumbnails = []; + for (var i = 0; i < object.videoThumbnails.length; ++i) { + if (typeof object.videoThumbnails[i] !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.VideoPayload.videoThumbnails: object expected"); + message.videoThumbnails[i] = $root.google.cloud.datalabeling.v1beta1.VideoThumbnail.fromObject(object.videoThumbnails[i]); + } } + if (object.frameRate != null) + message.frameRate = Number(object.frameRate); + if (object.signedUri != null) + message.signedUri = String(object.signedUri); return message; }; /** - * Creates a plain object from an AnnotationValue message. Also converts values to other types if specified. + * Creates a plain object from a VideoPayload message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @static - * @param {google.cloud.datalabeling.v1beta1.AnnotationValue} message AnnotationValue + * @param {google.cloud.datalabeling.v1beta1.VideoPayload} message VideoPayload * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnnotationValue.toObject = function toObject(message, options) { + VideoPayload.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.imageClassificationAnnotation != null && message.hasOwnProperty("imageClassificationAnnotation")) { - object.imageClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.toObject(message.imageClassificationAnnotation, options); - if (options.oneofs) - object.valueType = "imageClassificationAnnotation"; - } - if (message.imageBoundingPolyAnnotation != null && message.hasOwnProperty("imageBoundingPolyAnnotation")) { - object.imageBoundingPolyAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.toObject(message.imageBoundingPolyAnnotation, options); - if (options.oneofs) - object.valueType = "imageBoundingPolyAnnotation"; - } - if (message.textClassificationAnnotation != null && message.hasOwnProperty("textClassificationAnnotation")) { - object.textClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.toObject(message.textClassificationAnnotation, options); - if (options.oneofs) - object.valueType = "textClassificationAnnotation"; - } - if (message.videoClassificationAnnotation != null && message.hasOwnProperty("videoClassificationAnnotation")) { - object.videoClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.toObject(message.videoClassificationAnnotation, options); - if (options.oneofs) - object.valueType = "videoClassificationAnnotation"; - } - if (message.videoObjectTrackingAnnotation != null && message.hasOwnProperty("videoObjectTrackingAnnotation")) { - object.videoObjectTrackingAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.toObject(message.videoObjectTrackingAnnotation, options); - if (options.oneofs) - object.valueType = "videoObjectTrackingAnnotation"; - } - if (message.videoEventAnnotation != null && message.hasOwnProperty("videoEventAnnotation")) { - object.videoEventAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.toObject(message.videoEventAnnotation, options); - if (options.oneofs) - object.valueType = "videoEventAnnotation"; - } - if (message.imagePolylineAnnotation != null && message.hasOwnProperty("imagePolylineAnnotation")) { - object.imagePolylineAnnotation = $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.toObject(message.imagePolylineAnnotation, options); - if (options.oneofs) - object.valueType = "imagePolylineAnnotation"; - } - if (message.imageSegmentationAnnotation != null && message.hasOwnProperty("imageSegmentationAnnotation")) { - object.imageSegmentationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.toObject(message.imageSegmentationAnnotation, options); - if (options.oneofs) - object.valueType = "imageSegmentationAnnotation"; + if (options.arrays || options.defaults) + object.videoThumbnails = []; + if (options.defaults) { + object.mimeType = ""; + object.videoUri = ""; + object.frameRate = 0; + object.signedUri = ""; } - if (message.textEntityExtractionAnnotation != null && message.hasOwnProperty("textEntityExtractionAnnotation")) { - object.textEntityExtractionAnnotation = $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.toObject(message.textEntityExtractionAnnotation, options); - if (options.oneofs) - object.valueType = "textEntityExtractionAnnotation"; + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.videoUri != null && message.hasOwnProperty("videoUri")) + object.videoUri = message.videoUri; + if (message.videoThumbnails && message.videoThumbnails.length) { + object.videoThumbnails = []; + for (var j = 0; j < message.videoThumbnails.length; ++j) + object.videoThumbnails[j] = $root.google.cloud.datalabeling.v1beta1.VideoThumbnail.toObject(message.videoThumbnails[j], options); } + if (message.frameRate != null && message.hasOwnProperty("frameRate")) + object.frameRate = options.json && !isFinite(message.frameRate) ? String(message.frameRate) : message.frameRate; + if (message.signedUri != null && message.hasOwnProperty("signedUri")) + object.signedUri = message.signedUri; return object; }; /** - * Converts this AnnotationValue to JSON. + * Converts this VideoPayload to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @memberof google.cloud.datalabeling.v1beta1.VideoPayload * @instance * @returns {Object.} JSON object */ - AnnotationValue.prototype.toJSON = function toJSON() { + VideoPayload.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AnnotationValue; + return VideoPayload; })(); - v1beta1.ImageClassificationAnnotation = (function() { + v1beta1.AnnotationSpecSet = (function() { /** - * Properties of an ImageClassificationAnnotation. + * Properties of an AnnotationSpecSet. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IImageClassificationAnnotation - * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] ImageClassificationAnnotation annotationSpec + * @interface IAnnotationSpecSet + * @property {string|null} [name] AnnotationSpecSet name + * @property {string|null} [displayName] AnnotationSpecSet displayName + * @property {string|null} [description] AnnotationSpecSet description + * @property {Array.|null} [annotationSpecs] AnnotationSpecSet annotationSpecs + * @property {Array.|null} [blockingResources] AnnotationSpecSet blockingResources */ /** - * Constructs a new ImageClassificationAnnotation. + * Constructs a new AnnotationSpecSet. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an ImageClassificationAnnotation. - * @implements IImageClassificationAnnotation + * @classdesc Represents an AnnotationSpecSet. + * @implements IAnnotationSpecSet * @constructor - * @param {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpecSet=} [properties] Properties to set */ - function ImageClassificationAnnotation(properties) { + function AnnotationSpecSet(properties) { + this.annotationSpecs = []; + this.blockingResources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1484,75 +1069,133 @@ } /** - * ImageClassificationAnnotation annotationSpec. - * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec - * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + * AnnotationSpecSet name. + * @member {string} name + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet * @instance */ - ImageClassificationAnnotation.prototype.annotationSpec = null; + AnnotationSpecSet.prototype.name = ""; /** - * Creates a new ImageClassificationAnnotation instance using the specified properties. + * AnnotationSpecSet displayName. + * @member {string} displayName + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @instance + */ + AnnotationSpecSet.prototype.displayName = ""; + + /** + * AnnotationSpecSet description. + * @member {string} description + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @instance + */ + AnnotationSpecSet.prototype.description = ""; + + /** + * AnnotationSpecSet annotationSpecs. + * @member {Array.} annotationSpecs + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @instance + */ + AnnotationSpecSet.prototype.annotationSpecs = $util.emptyArray; + + /** + * AnnotationSpecSet blockingResources. + * @member {Array.} blockingResources + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet + * @instance + */ + AnnotationSpecSet.prototype.blockingResources = $util.emptyArray; + + /** + * Creates a new AnnotationSpecSet instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet * @static - * @param {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} ImageClassificationAnnotation instance + * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpecSet=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpecSet} AnnotationSpecSet instance */ - ImageClassificationAnnotation.create = function create(properties) { - return new ImageClassificationAnnotation(properties); + AnnotationSpecSet.create = function create(properties) { + return new AnnotationSpecSet(properties); }; /** - * Encodes the specified ImageClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.verify|verify} messages. + * Encodes the specified AnnotationSpecSet message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpecSet.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet * @static - * @param {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation} message ImageClassificationAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpecSet} message AnnotationSpecSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageClassificationAnnotation.encode = function encode(message, writer) { + AnnotationSpecSet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.annotationSpecs != null && message.annotationSpecs.length) + for (var i = 0; i < message.annotationSpecs.length; ++i) + $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpecs[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.blockingResources != null && message.blockingResources.length) + for (var i = 0; i < message.blockingResources.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.blockingResources[i]); return writer; }; /** - * Encodes the specified ImageClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.verify|verify} messages. + * Encodes the specified AnnotationSpecSet message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpecSet.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet * @static - * @param {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation} message ImageClassificationAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpecSet} message AnnotationSpecSet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + AnnotationSpecSet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageClassificationAnnotation message from the specified reader or buffer. + * Decodes an AnnotationSpecSet message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} ImageClassificationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpecSet} AnnotationSpecSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageClassificationAnnotation.decode = function decode(reader, length) { + AnnotationSpecSet.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.AnnotationSpecSet(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + if (!(message.annotationSpecs && message.annotationSpecs.length)) + message.annotationSpecs = []; + message.annotationSpecs.push($root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.blockingResources && message.blockingResources.length)) + message.blockingResources = []; + message.blockingResources.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -1563,113 +1206,172 @@ }; /** - * Decodes an ImageClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes an AnnotationSpecSet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} ImageClassificationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpecSet} AnnotationSpecSet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { + AnnotationSpecSet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageClassificationAnnotation message. + * Verifies an AnnotationSpecSet message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageClassificationAnnotation.verify = function verify(message) { + AnnotationSpecSet.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { - var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); - if (error) - return "annotationSpec." + error; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.annotationSpecs != null && message.hasOwnProperty("annotationSpecs")) { + if (!Array.isArray(message.annotationSpecs)) + return "annotationSpecs: array expected"; + for (var i = 0; i < message.annotationSpecs.length; ++i) { + var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpecs[i]); + if (error) + return "annotationSpecs." + error; + } + } + if (message.blockingResources != null && message.hasOwnProperty("blockingResources")) { + if (!Array.isArray(message.blockingResources)) + return "blockingResources: array expected"; + for (var i = 0; i < message.blockingResources.length; ++i) + if (!$util.isString(message.blockingResources[i])) + return "blockingResources: string[] expected"; } return null; }; /** - * Creates an ImageClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationSpecSet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} ImageClassificationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpecSet} AnnotationSpecSet */ - ImageClassificationAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) + AnnotationSpecSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.AnnotationSpecSet) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation(); - if (object.annotationSpec != null) { - if (typeof object.annotationSpec !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.annotationSpec: object expected"); - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); + var message = new $root.google.cloud.datalabeling.v1beta1.AnnotationSpecSet(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.annotationSpecs) { + if (!Array.isArray(object.annotationSpecs)) + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationSpecSet.annotationSpecs: array expected"); + message.annotationSpecs = []; + for (var i = 0; i < object.annotationSpecs.length; ++i) { + if (typeof object.annotationSpecs[i] !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationSpecSet.annotationSpecs: object expected"); + message.annotationSpecs[i] = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpecs[i]); + } + } + if (object.blockingResources) { + if (!Array.isArray(object.blockingResources)) + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationSpecSet.blockingResources: array expected"); + message.blockingResources = []; + for (var i = 0; i < object.blockingResources.length; ++i) + message.blockingResources[i] = String(object.blockingResources[i]); } return message; }; /** - * Creates a plain object from an ImageClassificationAnnotation message. Also converts values to other types if specified. + * Creates a plain object from an AnnotationSpecSet message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet * @static - * @param {google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} message ImageClassificationAnnotation + * @param {google.cloud.datalabeling.v1beta1.AnnotationSpecSet} message AnnotationSpecSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageClassificationAnnotation.toObject = function toObject(message, options) { + AnnotationSpecSet.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.annotationSpec = null; - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); + if (options.arrays || options.defaults) { + object.annotationSpecs = []; + object.blockingResources = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.annotationSpecs && message.annotationSpecs.length) { + object.annotationSpecs = []; + for (var j = 0; j < message.annotationSpecs.length; ++j) + object.annotationSpecs[j] = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpecs[j], options); + } + if (message.blockingResources && message.blockingResources.length) { + object.blockingResources = []; + for (var j = 0; j < message.blockingResources.length; ++j) + object.blockingResources[j] = message.blockingResources[j]; + } return object; }; /** - * Converts this ImageClassificationAnnotation to JSON. + * Converts this AnnotationSpecSet to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpecSet * @instance * @returns {Object.} JSON object */ - ImageClassificationAnnotation.prototype.toJSON = function toJSON() { + AnnotationSpecSet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageClassificationAnnotation; + return AnnotationSpecSet; })(); - v1beta1.Vertex = (function() { + v1beta1.AnnotationSpec = (function() { /** - * Properties of a Vertex. + * Properties of an AnnotationSpec. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IVertex - * @property {number|null} [x] Vertex x - * @property {number|null} [y] Vertex y + * @interface IAnnotationSpec + * @property {string|null} [displayName] AnnotationSpec displayName + * @property {string|null} [description] AnnotationSpec description */ /** - * Constructs a new Vertex. + * Constructs a new AnnotationSpec. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a Vertex. - * @implements IVertex + * @classdesc Represents an AnnotationSpec. + * @implements IAnnotationSpec * @constructor - * @param {google.cloud.datalabeling.v1beta1.IVertex=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpec=} [properties] Properties to set */ - function Vertex(properties) { + function AnnotationSpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1677,88 +1379,88 @@ } /** - * Vertex x. - * @member {number} x - * @memberof google.cloud.datalabeling.v1beta1.Vertex + * AnnotationSpec displayName. + * @member {string} displayName + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec * @instance */ - Vertex.prototype.x = 0; + AnnotationSpec.prototype.displayName = ""; /** - * Vertex y. - * @member {number} y - * @memberof google.cloud.datalabeling.v1beta1.Vertex + * AnnotationSpec description. + * @member {string} description + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec * @instance */ - Vertex.prototype.y = 0; + AnnotationSpec.prototype.description = ""; /** - * Creates a new Vertex instance using the specified properties. + * Creates a new AnnotationSpec instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.Vertex + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec * @static - * @param {google.cloud.datalabeling.v1beta1.IVertex=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.Vertex} Vertex instance + * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpec=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpec} AnnotationSpec instance */ - Vertex.create = function create(properties) { - return new Vertex(properties); + AnnotationSpec.create = function create(properties) { + return new AnnotationSpec(properties); }; /** - * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Vertex.verify|verify} messages. + * Encodes the specified AnnotationSpec message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.Vertex + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec * @static - * @param {google.cloud.datalabeling.v1beta1.IVertex} message Vertex message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpec} message AnnotationSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Vertex.encode = function encode(message, writer) { + AnnotationSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.x != null && message.hasOwnProperty("x")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.x); - if (message.y != null && message.hasOwnProperty("y")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.y); + if (message.displayName != null && message.hasOwnProperty("displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); return writer; }; /** - * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Vertex.verify|verify} messages. + * Encodes the specified AnnotationSpec message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.Vertex + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec * @static - * @param {google.cloud.datalabeling.v1beta1.IVertex} message Vertex message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IAnnotationSpec} message AnnotationSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Vertex.encodeDelimited = function encodeDelimited(message, writer) { + AnnotationSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Vertex message from the specified reader or buffer. + * Decodes an AnnotationSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.Vertex + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.Vertex} Vertex + * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpec} AnnotationSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Vertex.decode = function decode(reader, length) { + AnnotationSpec.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.Vertex(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.AnnotationSpec(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.x = reader.int32(); + message.displayName = reader.string(); break; case 2: - message.y = reader.int32(); + message.description = reader.string(); break; default: reader.skipType(tag & 7); @@ -1769,117 +1471,134 @@ }; /** - * Decodes a Vertex message from the specified reader or buffer, length delimited. + * Decodes an AnnotationSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.Vertex + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.Vertex} Vertex + * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpec} AnnotationSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Vertex.decodeDelimited = function decodeDelimited(reader) { + AnnotationSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Vertex message. + * Verifies an AnnotationSpec message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.Vertex + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Vertex.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.x != null && message.hasOwnProperty("x")) - if (!$util.isInteger(message.x)) - return "x: integer expected"; - if (message.y != null && message.hasOwnProperty("y")) - if (!$util.isInteger(message.y)) - return "y: integer expected"; + */ + AnnotationSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; return null; }; /** - * Creates a Vertex message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.Vertex + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.Vertex} Vertex + * @returns {google.cloud.datalabeling.v1beta1.AnnotationSpec} AnnotationSpec */ - Vertex.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.Vertex) + AnnotationSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.AnnotationSpec) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.Vertex(); - if (object.x != null) - message.x = object.x | 0; - if (object.y != null) - message.y = object.y | 0; + var message = new $root.google.cloud.datalabeling.v1beta1.AnnotationSpec(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); return message; }; /** - * Creates a plain object from a Vertex message. Also converts values to other types if specified. + * Creates a plain object from an AnnotationSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.Vertex + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec * @static - * @param {google.cloud.datalabeling.v1beta1.Vertex} message Vertex + * @param {google.cloud.datalabeling.v1beta1.AnnotationSpec} message AnnotationSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Vertex.toObject = function toObject(message, options) { + AnnotationSpec.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.x = 0; - object.y = 0; + object.displayName = ""; + object.description = ""; } - if (message.x != null && message.hasOwnProperty("x")) - object.x = message.x; - if (message.y != null && message.hasOwnProperty("y")) - object.y = message.y; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; return object; }; /** - * Converts this Vertex to JSON. + * Converts this AnnotationSpec to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.Vertex + * @memberof google.cloud.datalabeling.v1beta1.AnnotationSpec * @instance * @returns {Object.} JSON object */ - Vertex.prototype.toJSON = function toJSON() { + AnnotationSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Vertex; + return AnnotationSpec; })(); - v1beta1.NormalizedVertex = (function() { + /** + * AnnotationSource enum. + * @name google.cloud.datalabeling.v1beta1.AnnotationSource + * @enum {string} + * @property {number} ANNOTATION_SOURCE_UNSPECIFIED=0 ANNOTATION_SOURCE_UNSPECIFIED value + * @property {number} OPERATOR=3 OPERATOR value + */ + v1beta1.AnnotationSource = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ANNOTATION_SOURCE_UNSPECIFIED"] = 0; + values[valuesById[3] = "OPERATOR"] = 3; + return values; + })(); + + v1beta1.Annotation = (function() { /** - * Properties of a NormalizedVertex. + * Properties of an Annotation. * @memberof google.cloud.datalabeling.v1beta1 - * @interface INormalizedVertex - * @property {number|null} [x] NormalizedVertex x - * @property {number|null} [y] NormalizedVertex y + * @interface IAnnotation + * @property {string|null} [name] Annotation name + * @property {google.cloud.datalabeling.v1beta1.AnnotationSource|null} [annotationSource] Annotation annotationSource + * @property {google.cloud.datalabeling.v1beta1.IAnnotationValue|null} [annotationValue] Annotation annotationValue + * @property {google.cloud.datalabeling.v1beta1.IAnnotationMetadata|null} [annotationMetadata] Annotation annotationMetadata + * @property {google.cloud.datalabeling.v1beta1.AnnotationSentiment|null} [annotationSentiment] Annotation annotationSentiment */ /** - * Constructs a new NormalizedVertex. + * Constructs a new Annotation. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a NormalizedVertex. - * @implements INormalizedVertex + * @classdesc Represents an Annotation. + * @implements IAnnotation * @constructor - * @param {google.cloud.datalabeling.v1beta1.INormalizedVertex=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IAnnotation=} [properties] Properties to set */ - function NormalizedVertex(properties) { + function Annotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1887,88 +1606,127 @@ } /** - * NormalizedVertex x. - * @member {number} x - * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * Annotation name. + * @member {string} name + * @memberof google.cloud.datalabeling.v1beta1.Annotation * @instance */ - NormalizedVertex.prototype.x = 0; + Annotation.prototype.name = ""; /** - * NormalizedVertex y. - * @member {number} y - * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * Annotation annotationSource. + * @member {google.cloud.datalabeling.v1beta1.AnnotationSource} annotationSource + * @memberof google.cloud.datalabeling.v1beta1.Annotation * @instance */ - NormalizedVertex.prototype.y = 0; + Annotation.prototype.annotationSource = 0; /** - * Creates a new NormalizedVertex instance using the specified properties. + * Annotation annotationValue. + * @member {google.cloud.datalabeling.v1beta1.IAnnotationValue|null|undefined} annotationValue + * @memberof google.cloud.datalabeling.v1beta1.Annotation + * @instance + */ + Annotation.prototype.annotationValue = null; + + /** + * Annotation annotationMetadata. + * @member {google.cloud.datalabeling.v1beta1.IAnnotationMetadata|null|undefined} annotationMetadata + * @memberof google.cloud.datalabeling.v1beta1.Annotation + * @instance + */ + Annotation.prototype.annotationMetadata = null; + + /** + * Annotation annotationSentiment. + * @member {google.cloud.datalabeling.v1beta1.AnnotationSentiment} annotationSentiment + * @memberof google.cloud.datalabeling.v1beta1.Annotation + * @instance + */ + Annotation.prototype.annotationSentiment = 0; + + /** + * Creates a new Annotation instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * @memberof google.cloud.datalabeling.v1beta1.Annotation * @static - * @param {google.cloud.datalabeling.v1beta1.INormalizedVertex=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.NormalizedVertex} NormalizedVertex instance + * @param {google.cloud.datalabeling.v1beta1.IAnnotation=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.Annotation} Annotation instance */ - NormalizedVertex.create = function create(properties) { - return new NormalizedVertex(properties); + Annotation.create = function create(properties) { + return new Annotation(properties); }; /** - * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedVertex.verify|verify} messages. + * Encodes the specified Annotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Annotation.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * @memberof google.cloud.datalabeling.v1beta1.Annotation * @static - * @param {google.cloud.datalabeling.v1beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NormalizedVertex.encode = function encode(message, writer) { + Annotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.x != null && message.hasOwnProperty("x")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.x); - if (message.y != null && message.hasOwnProperty("y")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.y); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.annotationSource != null && message.hasOwnProperty("annotationSource")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.annotationSource); + if (message.annotationValue != null && message.hasOwnProperty("annotationValue")) + $root.google.cloud.datalabeling.v1beta1.AnnotationValue.encode(message.annotationValue, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.annotationMetadata != null && message.hasOwnProperty("annotationMetadata")) + $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata.encode(message.annotationMetadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.annotationSentiment != null && message.hasOwnProperty("annotationSentiment")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.annotationSentiment); return writer; }; /** - * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedVertex.verify|verify} messages. + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Annotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * @memberof google.cloud.datalabeling.v1beta1.Annotation * @static - * @param {google.cloud.datalabeling.v1beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IAnnotation} message Annotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NormalizedVertex.encodeDelimited = function encodeDelimited(message, writer) { + Annotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NormalizedVertex message from the specified reader or buffer. + * Decodes an Annotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * @memberof google.cloud.datalabeling.v1beta1.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.NormalizedVertex} NormalizedVertex + * @returns {google.cloud.datalabeling.v1beta1.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NormalizedVertex.decode = function decode(reader, length) { + Annotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.NormalizedVertex(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.Annotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.x = reader.float(); + message.name = reader.string(); break; case 2: - message.y = reader.float(); + message.annotationSource = reader.int32(); + break; + case 3: + message.annotationValue = $root.google.cloud.datalabeling.v1beta1.AnnotationValue.decode(reader, reader.uint32()); + break; + case 4: + message.annotationMetadata = $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata.decode(reader, reader.uint32()); + break; + case 6: + message.annotationSentiment = reader.int32(); break; default: reader.skipType(tag & 7); @@ -1979,117 +1737,243 @@ }; /** - * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * @memberof google.cloud.datalabeling.v1beta1.Annotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.NormalizedVertex} NormalizedVertex + * @returns {google.cloud.datalabeling.v1beta1.Annotation} Annotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NormalizedVertex.decodeDelimited = function decodeDelimited(reader) { + Annotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NormalizedVertex message. + * Verifies an Annotation message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * @memberof google.cloud.datalabeling.v1beta1.Annotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NormalizedVertex.verify = function verify(message) { + Annotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.x != null && message.hasOwnProperty("x")) - if (typeof message.x !== "number") - return "x: number expected"; - if (message.y != null && message.hasOwnProperty("y")) - if (typeof message.y !== "number") - return "y: number expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.annotationSource != null && message.hasOwnProperty("annotationSource")) + switch (message.annotationSource) { + default: + return "annotationSource: enum value expected"; + case 0: + case 3: + break; + } + if (message.annotationValue != null && message.hasOwnProperty("annotationValue")) { + var error = $root.google.cloud.datalabeling.v1beta1.AnnotationValue.verify(message.annotationValue); + if (error) + return "annotationValue." + error; + } + if (message.annotationMetadata != null && message.hasOwnProperty("annotationMetadata")) { + var error = $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata.verify(message.annotationMetadata); + if (error) + return "annotationMetadata." + error; + } + if (message.annotationSentiment != null && message.hasOwnProperty("annotationSentiment")) + switch (message.annotationSentiment) { + default: + return "annotationSentiment: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * @memberof google.cloud.datalabeling.v1beta1.Annotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.NormalizedVertex} NormalizedVertex + * @returns {google.cloud.datalabeling.v1beta1.Annotation} Annotation */ - NormalizedVertex.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.NormalizedVertex) + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.Annotation) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.NormalizedVertex(); - if (object.x != null) - message.x = Number(object.x); - if (object.y != null) - message.y = Number(object.y); + var message = new $root.google.cloud.datalabeling.v1beta1.Annotation(); + if (object.name != null) + message.name = String(object.name); + switch (object.annotationSource) { + case "ANNOTATION_SOURCE_UNSPECIFIED": + case 0: + message.annotationSource = 0; + break; + case "OPERATOR": + case 3: + message.annotationSource = 3; + break; + } + if (object.annotationValue != null) { + if (typeof object.annotationValue !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.Annotation.annotationValue: object expected"); + message.annotationValue = $root.google.cloud.datalabeling.v1beta1.AnnotationValue.fromObject(object.annotationValue); + } + if (object.annotationMetadata != null) { + if (typeof object.annotationMetadata !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.Annotation.annotationMetadata: object expected"); + message.annotationMetadata = $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata.fromObject(object.annotationMetadata); + } + switch (object.annotationSentiment) { + case "ANNOTATION_SENTIMENT_UNSPECIFIED": + case 0: + message.annotationSentiment = 0; + break; + case "NEGATIVE": + case 1: + message.annotationSentiment = 1; + break; + case "POSITIVE": + case 2: + message.annotationSentiment = 2; + break; + } return message; }; /** - * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. + * Creates a plain object from an Annotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * @memberof google.cloud.datalabeling.v1beta1.Annotation * @static - * @param {google.cloud.datalabeling.v1beta1.NormalizedVertex} message NormalizedVertex + * @param {google.cloud.datalabeling.v1beta1.Annotation} message Annotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NormalizedVertex.toObject = function toObject(message, options) { + Annotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.x = 0; - object.y = 0; + object.name = ""; + object.annotationSource = options.enums === String ? "ANNOTATION_SOURCE_UNSPECIFIED" : 0; + object.annotationValue = null; + object.annotationMetadata = null; + object.annotationSentiment = options.enums === String ? "ANNOTATION_SENTIMENT_UNSPECIFIED" : 0; } - if (message.x != null && message.hasOwnProperty("x")) - object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; - if (message.y != null && message.hasOwnProperty("y")) - object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.annotationSource != null && message.hasOwnProperty("annotationSource")) + object.annotationSource = options.enums === String ? $root.google.cloud.datalabeling.v1beta1.AnnotationSource[message.annotationSource] : message.annotationSource; + if (message.annotationValue != null && message.hasOwnProperty("annotationValue")) + object.annotationValue = $root.google.cloud.datalabeling.v1beta1.AnnotationValue.toObject(message.annotationValue, options); + if (message.annotationMetadata != null && message.hasOwnProperty("annotationMetadata")) + object.annotationMetadata = $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata.toObject(message.annotationMetadata, options); + if (message.annotationSentiment != null && message.hasOwnProperty("annotationSentiment")) + object.annotationSentiment = options.enums === String ? $root.google.cloud.datalabeling.v1beta1.AnnotationSentiment[message.annotationSentiment] : message.annotationSentiment; return object; }; /** - * Converts this NormalizedVertex to JSON. + * Converts this Annotation to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * @memberof google.cloud.datalabeling.v1beta1.Annotation * @instance * @returns {Object.} JSON object */ - NormalizedVertex.prototype.toJSON = function toJSON() { + Annotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return NormalizedVertex; + return Annotation; })(); - v1beta1.BoundingPoly = (function() { + /** + * AnnotationSentiment enum. + * @name google.cloud.datalabeling.v1beta1.AnnotationSentiment + * @enum {string} + * @property {number} ANNOTATION_SENTIMENT_UNSPECIFIED=0 ANNOTATION_SENTIMENT_UNSPECIFIED value + * @property {number} NEGATIVE=1 NEGATIVE value + * @property {number} POSITIVE=2 POSITIVE value + */ + v1beta1.AnnotationSentiment = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ANNOTATION_SENTIMENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEGATIVE"] = 1; + values[valuesById[2] = "POSITIVE"] = 2; + return values; + })(); + + /** + * AnnotationType enum. + * @name google.cloud.datalabeling.v1beta1.AnnotationType + * @enum {string} + * @property {number} ANNOTATION_TYPE_UNSPECIFIED=0 ANNOTATION_TYPE_UNSPECIFIED value + * @property {number} IMAGE_CLASSIFICATION_ANNOTATION=1 IMAGE_CLASSIFICATION_ANNOTATION value + * @property {number} IMAGE_BOUNDING_BOX_ANNOTATION=2 IMAGE_BOUNDING_BOX_ANNOTATION value + * @property {number} IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION=13 IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION value + * @property {number} IMAGE_BOUNDING_POLY_ANNOTATION=10 IMAGE_BOUNDING_POLY_ANNOTATION value + * @property {number} IMAGE_POLYLINE_ANNOTATION=11 IMAGE_POLYLINE_ANNOTATION value + * @property {number} IMAGE_SEGMENTATION_ANNOTATION=12 IMAGE_SEGMENTATION_ANNOTATION value + * @property {number} VIDEO_SHOTS_CLASSIFICATION_ANNOTATION=3 VIDEO_SHOTS_CLASSIFICATION_ANNOTATION value + * @property {number} VIDEO_OBJECT_TRACKING_ANNOTATION=4 VIDEO_OBJECT_TRACKING_ANNOTATION value + * @property {number} VIDEO_OBJECT_DETECTION_ANNOTATION=5 VIDEO_OBJECT_DETECTION_ANNOTATION value + * @property {number} VIDEO_EVENT_ANNOTATION=6 VIDEO_EVENT_ANNOTATION value + * @property {number} TEXT_CLASSIFICATION_ANNOTATION=8 TEXT_CLASSIFICATION_ANNOTATION value + * @property {number} TEXT_ENTITY_EXTRACTION_ANNOTATION=9 TEXT_ENTITY_EXTRACTION_ANNOTATION value + * @property {number} GENERAL_CLASSIFICATION_ANNOTATION=14 GENERAL_CLASSIFICATION_ANNOTATION value + */ + v1beta1.AnnotationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ANNOTATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMAGE_CLASSIFICATION_ANNOTATION"] = 1; + values[valuesById[2] = "IMAGE_BOUNDING_BOX_ANNOTATION"] = 2; + values[valuesById[13] = "IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION"] = 13; + values[valuesById[10] = "IMAGE_BOUNDING_POLY_ANNOTATION"] = 10; + values[valuesById[11] = "IMAGE_POLYLINE_ANNOTATION"] = 11; + values[valuesById[12] = "IMAGE_SEGMENTATION_ANNOTATION"] = 12; + values[valuesById[3] = "VIDEO_SHOTS_CLASSIFICATION_ANNOTATION"] = 3; + values[valuesById[4] = "VIDEO_OBJECT_TRACKING_ANNOTATION"] = 4; + values[valuesById[5] = "VIDEO_OBJECT_DETECTION_ANNOTATION"] = 5; + values[valuesById[6] = "VIDEO_EVENT_ANNOTATION"] = 6; + values[valuesById[8] = "TEXT_CLASSIFICATION_ANNOTATION"] = 8; + values[valuesById[9] = "TEXT_ENTITY_EXTRACTION_ANNOTATION"] = 9; + values[valuesById[14] = "GENERAL_CLASSIFICATION_ANNOTATION"] = 14; + return values; + })(); + + v1beta1.AnnotationValue = (function() { /** - * Properties of a BoundingPoly. + * Properties of an AnnotationValue. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IBoundingPoly - * @property {Array.|null} [vertices] BoundingPoly vertices + * @interface IAnnotationValue + * @property {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation|null} [imageClassificationAnnotation] AnnotationValue imageClassificationAnnotation + * @property {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation|null} [imageBoundingPolyAnnotation] AnnotationValue imageBoundingPolyAnnotation + * @property {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation|null} [imagePolylineAnnotation] AnnotationValue imagePolylineAnnotation + * @property {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation|null} [imageSegmentationAnnotation] AnnotationValue imageSegmentationAnnotation + * @property {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation|null} [textClassificationAnnotation] AnnotationValue textClassificationAnnotation + * @property {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation|null} [textEntityExtractionAnnotation] AnnotationValue textEntityExtractionAnnotation + * @property {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation|null} [videoClassificationAnnotation] AnnotationValue videoClassificationAnnotation + * @property {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation|null} [videoObjectTrackingAnnotation] AnnotationValue videoObjectTrackingAnnotation + * @property {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation|null} [videoEventAnnotation] AnnotationValue videoEventAnnotation */ /** - * Constructs a new BoundingPoly. + * Constructs a new AnnotationValue. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a BoundingPoly. - * @implements IBoundingPoly + * @classdesc Represents an AnnotationValue. + * @implements IAnnotationValue * @constructor - * @param {google.cloud.datalabeling.v1beta1.IBoundingPoly=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IAnnotationValue=} [properties] Properties to set */ - function BoundingPoly(properties) { - this.vertices = []; + function AnnotationValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2097,78 +1981,193 @@ } /** - * BoundingPoly vertices. - * @member {Array.} vertices - * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly + * AnnotationValue imageClassificationAnnotation. + * @member {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation|null|undefined} imageClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue * @instance */ - BoundingPoly.prototype.vertices = $util.emptyArray; + AnnotationValue.prototype.imageClassificationAnnotation = null; /** - * Creates a new BoundingPoly instance using the specified properties. + * AnnotationValue imageBoundingPolyAnnotation. + * @member {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation|null|undefined} imageBoundingPolyAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @instance + */ + AnnotationValue.prototype.imageBoundingPolyAnnotation = null; + + /** + * AnnotationValue imagePolylineAnnotation. + * @member {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation|null|undefined} imagePolylineAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @instance + */ + AnnotationValue.prototype.imagePolylineAnnotation = null; + + /** + * AnnotationValue imageSegmentationAnnotation. + * @member {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation|null|undefined} imageSegmentationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @instance + */ + AnnotationValue.prototype.imageSegmentationAnnotation = null; + + /** + * AnnotationValue textClassificationAnnotation. + * @member {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation|null|undefined} textClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @instance + */ + AnnotationValue.prototype.textClassificationAnnotation = null; + + /** + * AnnotationValue textEntityExtractionAnnotation. + * @member {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation|null|undefined} textEntityExtractionAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @instance + */ + AnnotationValue.prototype.textEntityExtractionAnnotation = null; + + /** + * AnnotationValue videoClassificationAnnotation. + * @member {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation|null|undefined} videoClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @instance + */ + AnnotationValue.prototype.videoClassificationAnnotation = null; + + /** + * AnnotationValue videoObjectTrackingAnnotation. + * @member {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation|null|undefined} videoObjectTrackingAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @instance + */ + AnnotationValue.prototype.videoObjectTrackingAnnotation = null; + + /** + * AnnotationValue videoEventAnnotation. + * @member {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation|null|undefined} videoEventAnnotation + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @instance + */ + AnnotationValue.prototype.videoEventAnnotation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnnotationValue valueType. + * @member {"imageClassificationAnnotation"|"imageBoundingPolyAnnotation"|"imagePolylineAnnotation"|"imageSegmentationAnnotation"|"textClassificationAnnotation"|"textEntityExtractionAnnotation"|"videoClassificationAnnotation"|"videoObjectTrackingAnnotation"|"videoEventAnnotation"|undefined} valueType + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue + * @instance + */ + Object.defineProperty(AnnotationValue.prototype, "valueType", { + get: $util.oneOfGetter($oneOfFields = ["imageClassificationAnnotation", "imageBoundingPolyAnnotation", "imagePolylineAnnotation", "imageSegmentationAnnotation", "textClassificationAnnotation", "textEntityExtractionAnnotation", "videoClassificationAnnotation", "videoObjectTrackingAnnotation", "videoEventAnnotation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnnotationValue instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue * @static - * @param {google.cloud.datalabeling.v1beta1.IBoundingPoly=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.BoundingPoly} BoundingPoly instance + * @param {google.cloud.datalabeling.v1beta1.IAnnotationValue=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.AnnotationValue} AnnotationValue instance */ - BoundingPoly.create = function create(properties) { - return new BoundingPoly(properties); + AnnotationValue.create = function create(properties) { + return new AnnotationValue(properties); }; /** - * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.BoundingPoly.verify|verify} messages. + * Encodes the specified AnnotationValue message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationValue.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue * @static - * @param {google.cloud.datalabeling.v1beta1.IBoundingPoly} message BoundingPoly message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IAnnotationValue} message AnnotationValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundingPoly.encode = function encode(message, writer) { + AnnotationValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vertices != null && message.vertices.length) - for (var i = 0; i < message.vertices.length; ++i) - $root.google.cloud.datalabeling.v1beta1.Vertex.encode(message.vertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.imageClassificationAnnotation != null && message.hasOwnProperty("imageClassificationAnnotation")) + $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.encode(message.imageClassificationAnnotation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.imageBoundingPolyAnnotation != null && message.hasOwnProperty("imageBoundingPolyAnnotation")) + $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.encode(message.imageBoundingPolyAnnotation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.textClassificationAnnotation != null && message.hasOwnProperty("textClassificationAnnotation")) + $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.encode(message.textClassificationAnnotation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.videoClassificationAnnotation != null && message.hasOwnProperty("videoClassificationAnnotation")) + $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.encode(message.videoClassificationAnnotation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.videoObjectTrackingAnnotation != null && message.hasOwnProperty("videoObjectTrackingAnnotation")) + $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.encode(message.videoObjectTrackingAnnotation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.videoEventAnnotation != null && message.hasOwnProperty("videoEventAnnotation")) + $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.encode(message.videoEventAnnotation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.imagePolylineAnnotation != null && message.hasOwnProperty("imagePolylineAnnotation")) + $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.encode(message.imagePolylineAnnotation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.imageSegmentationAnnotation != null && message.hasOwnProperty("imageSegmentationAnnotation")) + $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.encode(message.imageSegmentationAnnotation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.textEntityExtractionAnnotation != null && message.hasOwnProperty("textEntityExtractionAnnotation")) + $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.encode(message.textEntityExtractionAnnotation, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.BoundingPoly.verify|verify} messages. + * Encodes the specified AnnotationValue message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue * @static - * @param {google.cloud.datalabeling.v1beta1.IBoundingPoly} message BoundingPoly message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IAnnotationValue} message AnnotationValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BoundingPoly.encodeDelimited = function encodeDelimited(message, writer) { + AnnotationValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BoundingPoly message from the specified reader or buffer. + * Decodes an AnnotationValue message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.BoundingPoly} BoundingPoly + * @returns {google.cloud.datalabeling.v1beta1.AnnotationValue} AnnotationValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundingPoly.decode = function decode(reader, length) { + AnnotationValue.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.BoundingPoly(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.AnnotationValue(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.vertices && message.vertices.length)) - message.vertices = []; - message.vertices.push($root.google.cloud.datalabeling.v1beta1.Vertex.decode(reader, reader.uint32())); + message.imageClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.decode(reader, reader.uint32()); + break; + case 2: + message.imageBoundingPolyAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.decode(reader, reader.uint32()); + break; + case 8: + message.imagePolylineAnnotation = $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.decode(reader, reader.uint32()); + break; + case 9: + message.imageSegmentationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.decode(reader, reader.uint32()); + break; + case 3: + message.textClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.decode(reader, reader.uint32()); + break; + case 10: + message.textEntityExtractionAnnotation = $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.decode(reader, reader.uint32()); + break; + case 4: + message.videoClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.decode(reader, reader.uint32()); + break; + case 5: + message.videoObjectTrackingAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.decode(reader, reader.uint32()); + break; + case 6: + message.videoEventAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2179,125 +2178,277 @@ }; /** - * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. + * Decodes an AnnotationValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.BoundingPoly} BoundingPoly + * @returns {google.cloud.datalabeling.v1beta1.AnnotationValue} AnnotationValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BoundingPoly.decodeDelimited = function decodeDelimited(reader) { + AnnotationValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BoundingPoly message. + * Verifies an AnnotationValue message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BoundingPoly.verify = function verify(message) { + AnnotationValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vertices != null && message.hasOwnProperty("vertices")) { - if (!Array.isArray(message.vertices)) - return "vertices: array expected"; - for (var i = 0; i < message.vertices.length; ++i) { - var error = $root.google.cloud.datalabeling.v1beta1.Vertex.verify(message.vertices[i]); + var properties = {}; + if (message.imageClassificationAnnotation != null && message.hasOwnProperty("imageClassificationAnnotation")) { + properties.valueType = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.verify(message.imageClassificationAnnotation); if (error) - return "vertices." + error; + return "imageClassificationAnnotation." + error; + } + } + if (message.imageBoundingPolyAnnotation != null && message.hasOwnProperty("imageBoundingPolyAnnotation")) { + if (properties.valueType === 1) + return "valueType: multiple values"; + properties.valueType = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.verify(message.imageBoundingPolyAnnotation); + if (error) + return "imageBoundingPolyAnnotation." + error; + } + } + if (message.imagePolylineAnnotation != null && message.hasOwnProperty("imagePolylineAnnotation")) { + if (properties.valueType === 1) + return "valueType: multiple values"; + properties.valueType = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.verify(message.imagePolylineAnnotation); + if (error) + return "imagePolylineAnnotation." + error; + } + } + if (message.imageSegmentationAnnotation != null && message.hasOwnProperty("imageSegmentationAnnotation")) { + if (properties.valueType === 1) + return "valueType: multiple values"; + properties.valueType = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.verify(message.imageSegmentationAnnotation); + if (error) + return "imageSegmentationAnnotation." + error; + } + } + if (message.textClassificationAnnotation != null && message.hasOwnProperty("textClassificationAnnotation")) { + if (properties.valueType === 1) + return "valueType: multiple values"; + properties.valueType = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.verify(message.textClassificationAnnotation); + if (error) + return "textClassificationAnnotation." + error; + } + } + if (message.textEntityExtractionAnnotation != null && message.hasOwnProperty("textEntityExtractionAnnotation")) { + if (properties.valueType === 1) + return "valueType: multiple values"; + properties.valueType = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.verify(message.textEntityExtractionAnnotation); + if (error) + return "textEntityExtractionAnnotation." + error; + } + } + if (message.videoClassificationAnnotation != null && message.hasOwnProperty("videoClassificationAnnotation")) { + if (properties.valueType === 1) + return "valueType: multiple values"; + properties.valueType = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.verify(message.videoClassificationAnnotation); + if (error) + return "videoClassificationAnnotation." + error; + } + } + if (message.videoObjectTrackingAnnotation != null && message.hasOwnProperty("videoObjectTrackingAnnotation")) { + if (properties.valueType === 1) + return "valueType: multiple values"; + properties.valueType = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.verify(message.videoObjectTrackingAnnotation); + if (error) + return "videoObjectTrackingAnnotation." + error; + } + } + if (message.videoEventAnnotation != null && message.hasOwnProperty("videoEventAnnotation")) { + if (properties.valueType === 1) + return "valueType: multiple values"; + properties.valueType = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.verify(message.videoEventAnnotation); + if (error) + return "videoEventAnnotation." + error; } } return null; }; /** - * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.BoundingPoly} BoundingPoly + * @returns {google.cloud.datalabeling.v1beta1.AnnotationValue} AnnotationValue */ - BoundingPoly.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.BoundingPoly) + AnnotationValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.AnnotationValue) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.BoundingPoly(); - if (object.vertices) { - if (!Array.isArray(object.vertices)) - throw TypeError(".google.cloud.datalabeling.v1beta1.BoundingPoly.vertices: array expected"); - message.vertices = []; - for (var i = 0; i < object.vertices.length; ++i) { - if (typeof object.vertices[i] !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.BoundingPoly.vertices: object expected"); - message.vertices[i] = $root.google.cloud.datalabeling.v1beta1.Vertex.fromObject(object.vertices[i]); - } + var message = new $root.google.cloud.datalabeling.v1beta1.AnnotationValue(); + if (object.imageClassificationAnnotation != null) { + if (typeof object.imageClassificationAnnotation !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.imageClassificationAnnotation: object expected"); + message.imageClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.fromObject(object.imageClassificationAnnotation); + } + if (object.imageBoundingPolyAnnotation != null) { + if (typeof object.imageBoundingPolyAnnotation !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.imageBoundingPolyAnnotation: object expected"); + message.imageBoundingPolyAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.fromObject(object.imageBoundingPolyAnnotation); + } + if (object.imagePolylineAnnotation != null) { + if (typeof object.imagePolylineAnnotation !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.imagePolylineAnnotation: object expected"); + message.imagePolylineAnnotation = $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.fromObject(object.imagePolylineAnnotation); + } + if (object.imageSegmentationAnnotation != null) { + if (typeof object.imageSegmentationAnnotation !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.imageSegmentationAnnotation: object expected"); + message.imageSegmentationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.fromObject(object.imageSegmentationAnnotation); + } + if (object.textClassificationAnnotation != null) { + if (typeof object.textClassificationAnnotation !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.textClassificationAnnotation: object expected"); + message.textClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.fromObject(object.textClassificationAnnotation); + } + if (object.textEntityExtractionAnnotation != null) { + if (typeof object.textEntityExtractionAnnotation !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.textEntityExtractionAnnotation: object expected"); + message.textEntityExtractionAnnotation = $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.fromObject(object.textEntityExtractionAnnotation); + } + if (object.videoClassificationAnnotation != null) { + if (typeof object.videoClassificationAnnotation !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.videoClassificationAnnotation: object expected"); + message.videoClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.fromObject(object.videoClassificationAnnotation); + } + if (object.videoObjectTrackingAnnotation != null) { + if (typeof object.videoObjectTrackingAnnotation !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.videoObjectTrackingAnnotation: object expected"); + message.videoObjectTrackingAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.fromObject(object.videoObjectTrackingAnnotation); + } + if (object.videoEventAnnotation != null) { + if (typeof object.videoEventAnnotation !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationValue.videoEventAnnotation: object expected"); + message.videoEventAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.fromObject(object.videoEventAnnotation); } return message; }; /** - * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. + * Creates a plain object from an AnnotationValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue * @static - * @param {google.cloud.datalabeling.v1beta1.BoundingPoly} message BoundingPoly + * @param {google.cloud.datalabeling.v1beta1.AnnotationValue} message AnnotationValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoundingPoly.toObject = function toObject(message, options) { + AnnotationValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.vertices = []; - if (message.vertices && message.vertices.length) { - object.vertices = []; - for (var j = 0; j < message.vertices.length; ++j) - object.vertices[j] = $root.google.cloud.datalabeling.v1beta1.Vertex.toObject(message.vertices[j], options); + if (message.imageClassificationAnnotation != null && message.hasOwnProperty("imageClassificationAnnotation")) { + object.imageClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.toObject(message.imageClassificationAnnotation, options); + if (options.oneofs) + object.valueType = "imageClassificationAnnotation"; + } + if (message.imageBoundingPolyAnnotation != null && message.hasOwnProperty("imageBoundingPolyAnnotation")) { + object.imageBoundingPolyAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.toObject(message.imageBoundingPolyAnnotation, options); + if (options.oneofs) + object.valueType = "imageBoundingPolyAnnotation"; + } + if (message.textClassificationAnnotation != null && message.hasOwnProperty("textClassificationAnnotation")) { + object.textClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.toObject(message.textClassificationAnnotation, options); + if (options.oneofs) + object.valueType = "textClassificationAnnotation"; + } + if (message.videoClassificationAnnotation != null && message.hasOwnProperty("videoClassificationAnnotation")) { + object.videoClassificationAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.toObject(message.videoClassificationAnnotation, options); + if (options.oneofs) + object.valueType = "videoClassificationAnnotation"; + } + if (message.videoObjectTrackingAnnotation != null && message.hasOwnProperty("videoObjectTrackingAnnotation")) { + object.videoObjectTrackingAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.toObject(message.videoObjectTrackingAnnotation, options); + if (options.oneofs) + object.valueType = "videoObjectTrackingAnnotation"; + } + if (message.videoEventAnnotation != null && message.hasOwnProperty("videoEventAnnotation")) { + object.videoEventAnnotation = $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation.toObject(message.videoEventAnnotation, options); + if (options.oneofs) + object.valueType = "videoEventAnnotation"; + } + if (message.imagePolylineAnnotation != null && message.hasOwnProperty("imagePolylineAnnotation")) { + object.imagePolylineAnnotation = $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.toObject(message.imagePolylineAnnotation, options); + if (options.oneofs) + object.valueType = "imagePolylineAnnotation"; + } + if (message.imageSegmentationAnnotation != null && message.hasOwnProperty("imageSegmentationAnnotation")) { + object.imageSegmentationAnnotation = $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.toObject(message.imageSegmentationAnnotation, options); + if (options.oneofs) + object.valueType = "imageSegmentationAnnotation"; + } + if (message.textEntityExtractionAnnotation != null && message.hasOwnProperty("textEntityExtractionAnnotation")) { + object.textEntityExtractionAnnotation = $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.toObject(message.textEntityExtractionAnnotation, options); + if (options.oneofs) + object.valueType = "textEntityExtractionAnnotation"; } return object; }; /** - * Converts this BoundingPoly to JSON. + * Converts this AnnotationValue to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.AnnotationValue * @instance * @returns {Object.} JSON object */ - BoundingPoly.prototype.toJSON = function toJSON() { + AnnotationValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BoundingPoly; + return AnnotationValue; })(); - v1beta1.NormalizedBoundingPoly = (function() { + v1beta1.ImageClassificationAnnotation = (function() { /** - * Properties of a NormalizedBoundingPoly. + * Properties of an ImageClassificationAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @interface INormalizedBoundingPoly - * @property {Array.|null} [normalizedVertices] NormalizedBoundingPoly normalizedVertices + * @interface IImageClassificationAnnotation + * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] ImageClassificationAnnotation annotationSpec */ /** - * Constructs a new NormalizedBoundingPoly. + * Constructs a new ImageClassificationAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a NormalizedBoundingPoly. - * @implements INormalizedBoundingPoly + * @classdesc Represents an ImageClassificationAnnotation. + * @implements IImageClassificationAnnotation * @constructor - * @param {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation=} [properties] Properties to set */ - function NormalizedBoundingPoly(properties) { - this.normalizedVertices = []; + function ImageClassificationAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2305,78 +2456,75 @@ } /** - * NormalizedBoundingPoly normalizedVertices. - * @member {Array.} normalizedVertices - * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + * ImageClassificationAnnotation annotationSpec. + * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec + * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation * @instance */ - NormalizedBoundingPoly.prototype.normalizedVertices = $util.emptyArray; + ImageClassificationAnnotation.prototype.annotationSpec = null; /** - * Creates a new NormalizedBoundingPoly instance using the specified properties. + * Creates a new ImageClassificationAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} NormalizedBoundingPoly instance + * @param {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} ImageClassificationAnnotation instance */ - NormalizedBoundingPoly.create = function create(properties) { - return new NormalizedBoundingPoly(properties); + ImageClassificationAnnotation.create = function create(properties) { + return new ImageClassificationAnnotation(properties); }; /** - * Encodes the specified NormalizedBoundingPoly message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify|verify} messages. + * Encodes the specified ImageClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly} message NormalizedBoundingPoly message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation} message ImageClassificationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NormalizedBoundingPoly.encode = function encode(message, writer) { + ImageClassificationAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.normalizedVertices != null && message.normalizedVertices.length) - for (var i = 0; i < message.normalizedVertices.length; ++i) - $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified NormalizedBoundingPoly message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify|verify} messages. + * Encodes the specified ImageClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly} message NormalizedBoundingPoly message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IImageClassificationAnnotation} message ImageClassificationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NormalizedBoundingPoly.encodeDelimited = function encodeDelimited(message, writer) { + ImageClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NormalizedBoundingPoly message from the specified reader or buffer. + * Decodes an ImageClassificationAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} NormalizedBoundingPoly + * @returns {google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} ImageClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NormalizedBoundingPoly.decode = function decode(reader, length) { + ImageClassificationAnnotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.normalizedVertices && message.normalizedVertices.length)) - message.normalizedVertices = []; - message.normalizedVertices.push($root.google.cloud.datalabeling.v1beta1.NormalizedVertex.decode(reader, reader.uint32())); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2387,126 +2535,113 @@ }; /** - * Decodes a NormalizedBoundingPoly message from the specified reader or buffer, length delimited. + * Decodes an ImageClassificationAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} NormalizedBoundingPoly + * @returns {google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} ImageClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NormalizedBoundingPoly.decodeDelimited = function decodeDelimited(reader) { + ImageClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NormalizedBoundingPoly message. + * Verifies an ImageClassificationAnnotation message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NormalizedBoundingPoly.verify = function verify(message) { + ImageClassificationAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) { - if (!Array.isArray(message.normalizedVertices)) - return "normalizedVertices: array expected"; - for (var i = 0; i < message.normalizedVertices.length; ++i) { - var error = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.verify(message.normalizedVertices[i]); - if (error) - return "normalizedVertices." + error; - } + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { + var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); + if (error) + return "annotationSpec." + error; } return null; }; /** - * Creates a NormalizedBoundingPoly message from a plain object. Also converts values to their respective internal types. + * Creates an ImageClassificationAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} NormalizedBoundingPoly + * @returns {google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} ImageClassificationAnnotation */ - NormalizedBoundingPoly.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) + ImageClassificationAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly(); - if (object.normalizedVertices) { - if (!Array.isArray(object.normalizedVertices)) - throw TypeError(".google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.normalizedVertices: array expected"); - message.normalizedVertices = []; - for (var i = 0; i < object.normalizedVertices.length; ++i) { - if (typeof object.normalizedVertices[i] !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.normalizedVertices: object expected"); - message.normalizedVertices[i] = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.fromObject(object.normalizedVertices[i]); - } + var message = new $root.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation(); + if (object.annotationSpec != null) { + if (typeof object.annotationSpec !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation.annotationSpec: object expected"); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); } return message; }; /** - * Creates a plain object from a NormalizedBoundingPoly message. Also converts values to other types if specified. + * Creates a plain object from an ImageClassificationAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} message NormalizedBoundingPoly + * @param {google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation} message ImageClassificationAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NormalizedBoundingPoly.toObject = function toObject(message, options) { + ImageClassificationAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.normalizedVertices = []; - if (message.normalizedVertices && message.normalizedVertices.length) { - object.normalizedVertices = []; - for (var j = 0; j < message.normalizedVertices.length; ++j) - object.normalizedVertices[j] = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.toObject(message.normalizedVertices[j], options); - } + if (options.defaults) + object.annotationSpec = null; + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); return object; }; /** - * Converts this NormalizedBoundingPoly to JSON. + * Converts this ImageClassificationAnnotation to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation * @instance * @returns {Object.} JSON object */ - NormalizedBoundingPoly.prototype.toJSON = function toJSON() { + ImageClassificationAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return NormalizedBoundingPoly; + return ImageClassificationAnnotation; })(); - v1beta1.ImageBoundingPolyAnnotation = (function() { + v1beta1.Vertex = (function() { /** - * Properties of an ImageBoundingPolyAnnotation. + * Properties of a Vertex. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IImageBoundingPolyAnnotation - * @property {google.cloud.datalabeling.v1beta1.IBoundingPoly|null} [boundingPoly] ImageBoundingPolyAnnotation boundingPoly - * @property {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null} [normalizedBoundingPoly] ImageBoundingPolyAnnotation normalizedBoundingPoly - * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] ImageBoundingPolyAnnotation annotationSpec + * @interface IVertex + * @property {number|null} [x] Vertex x + * @property {number|null} [y] Vertex y */ /** - * Constructs a new ImageBoundingPolyAnnotation. + * Constructs a new Vertex. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an ImageBoundingPolyAnnotation. - * @implements IImageBoundingPolyAnnotation + * @classdesc Represents a Vertex. + * @implements IVertex * @constructor - * @param {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IVertex=} [properties] Properties to set */ - function ImageBoundingPolyAnnotation(properties) { + function Vertex(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2514,115 +2649,88 @@ } /** - * ImageBoundingPolyAnnotation boundingPoly. - * @member {google.cloud.datalabeling.v1beta1.IBoundingPoly|null|undefined} boundingPoly - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation - * @instance - */ - ImageBoundingPolyAnnotation.prototype.boundingPoly = null; - - /** - * ImageBoundingPolyAnnotation normalizedBoundingPoly. - * @member {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null|undefined} normalizedBoundingPoly - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation - * @instance - */ - ImageBoundingPolyAnnotation.prototype.normalizedBoundingPoly = null; - - /** - * ImageBoundingPolyAnnotation annotationSpec. - * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * Vertex x. + * @member {number} x + * @memberof google.cloud.datalabeling.v1beta1.Vertex * @instance */ - ImageBoundingPolyAnnotation.prototype.annotationSpec = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Vertex.prototype.x = 0; /** - * ImageBoundingPolyAnnotation boundedArea. - * @member {"boundingPoly"|"normalizedBoundingPoly"|undefined} boundedArea - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * Vertex y. + * @member {number} y + * @memberof google.cloud.datalabeling.v1beta1.Vertex * @instance */ - Object.defineProperty(ImageBoundingPolyAnnotation.prototype, "boundedArea", { - get: $util.oneOfGetter($oneOfFields = ["boundingPoly", "normalizedBoundingPoly"]), - set: $util.oneOfSetter($oneOfFields) - }); + Vertex.prototype.y = 0; /** - * Creates a new ImageBoundingPolyAnnotation instance using the specified properties. + * Creates a new Vertex instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Vertex * @static - * @param {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} ImageBoundingPolyAnnotation instance + * @param {google.cloud.datalabeling.v1beta1.IVertex=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.Vertex} Vertex instance */ - ImageBoundingPolyAnnotation.create = function create(properties) { - return new ImageBoundingPolyAnnotation(properties); + Vertex.create = function create(properties) { + return new Vertex(properties); }; /** - * Encodes the specified ImageBoundingPolyAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.verify|verify} messages. + * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Vertex.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Vertex * @static - * @param {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation} message ImageBoundingPolyAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVertex} message Vertex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageBoundingPolyAnnotation.encode = function encode(message, writer) { + Vertex.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) - $root.google.cloud.datalabeling.v1beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) - $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.encode(message.normalizedBoundingPoly, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.x != null && message.hasOwnProperty("x")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.x); + if (message.y != null && message.hasOwnProperty("y")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.y); return writer; }; /** - * Encodes the specified ImageBoundingPolyAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.verify|verify} messages. + * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Vertex.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Vertex * @static - * @param {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation} message ImageBoundingPolyAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVertex} message Vertex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageBoundingPolyAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + Vertex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageBoundingPolyAnnotation message from the specified reader or buffer. + * Decodes a Vertex message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Vertex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} ImageBoundingPolyAnnotation + * @returns {google.cloud.datalabeling.v1beta1.Vertex} Vertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageBoundingPolyAnnotation.decode = function decode(reader, length) { + Vertex.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.Vertex(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.decode(reader, reader.uint32()); - break; - case 3: - message.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.decode(reader, reader.uint32()); - break; case 1: - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); + message.x = reader.int32(); + break; + case 2: + message.y = reader.int32(); break; default: reader.skipType(tag & 7); @@ -2633,152 +2741,117 @@ }; /** - * Decodes an ImageBoundingPolyAnnotation message from the specified reader or buffer, length delimited. + * Decodes a Vertex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Vertex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} ImageBoundingPolyAnnotation + * @returns {google.cloud.datalabeling.v1beta1.Vertex} Vertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageBoundingPolyAnnotation.decodeDelimited = function decodeDelimited(reader) { + Vertex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageBoundingPolyAnnotation message. + * Verifies a Vertex message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Vertex * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageBoundingPolyAnnotation.verify = function verify(message) { + Vertex.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { - properties.boundedArea = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.verify(message.boundingPoly); - if (error) - return "boundingPoly." + error; - } - } - if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) { - if (properties.boundedArea === 1) - return "boundedArea: multiple values"; - properties.boundedArea = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify(message.normalizedBoundingPoly); - if (error) - return "normalizedBoundingPoly." + error; - } - } - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { - var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); - if (error) - return "annotationSpec." + error; - } + if (message.x != null && message.hasOwnProperty("x")) + if (!$util.isInteger(message.x)) + return "x: integer expected"; + if (message.y != null && message.hasOwnProperty("y")) + if (!$util.isInteger(message.y)) + return "y: integer expected"; return null; }; /** - * Creates an ImageBoundingPolyAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a Vertex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Vertex * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} ImageBoundingPolyAnnotation + * @returns {google.cloud.datalabeling.v1beta1.Vertex} Vertex */ - ImageBoundingPolyAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) + Vertex.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.Vertex) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation(); - if (object.boundingPoly != null) { - if (typeof object.boundingPoly !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.boundingPoly: object expected"); - message.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.fromObject(object.boundingPoly); - } - if (object.normalizedBoundingPoly != null) { - if (typeof object.normalizedBoundingPoly !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.normalizedBoundingPoly: object expected"); - message.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.fromObject(object.normalizedBoundingPoly); - } - if (object.annotationSpec != null) { - if (typeof object.annotationSpec !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.annotationSpec: object expected"); - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); - } + var message = new $root.google.cloud.datalabeling.v1beta1.Vertex(); + if (object.x != null) + message.x = object.x | 0; + if (object.y != null) + message.y = object.y | 0; return message; }; /** - * Creates a plain object from an ImageBoundingPolyAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a Vertex message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Vertex * @static - * @param {google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} message ImageBoundingPolyAnnotation + * @param {google.cloud.datalabeling.v1beta1.Vertex} message Vertex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageBoundingPolyAnnotation.toObject = function toObject(message, options) { + Vertex.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.annotationSpec = null; - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { - object.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.toObject(message.boundingPoly, options); - if (options.oneofs) - object.boundedArea = "boundingPoly"; - } - if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) { - object.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.toObject(message.normalizedBoundingPoly, options); - if (options.oneofs) - object.boundedArea = "normalizedBoundingPoly"; + if (options.defaults) { + object.x = 0; + object.y = 0; } + if (message.x != null && message.hasOwnProperty("x")) + object.x = message.x; + if (message.y != null && message.hasOwnProperty("y")) + object.y = message.y; return object; }; /** - * Converts this ImageBoundingPolyAnnotation to JSON. + * Converts this Vertex to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Vertex * @instance * @returns {Object.} JSON object */ - ImageBoundingPolyAnnotation.prototype.toJSON = function toJSON() { + Vertex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageBoundingPolyAnnotation; + return Vertex; })(); - v1beta1.Polyline = (function() { + v1beta1.NormalizedVertex = (function() { /** - * Properties of a Polyline. + * Properties of a NormalizedVertex. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IPolyline - * @property {Array.|null} [vertices] Polyline vertices + * @interface INormalizedVertex + * @property {number|null} [x] NormalizedVertex x + * @property {number|null} [y] NormalizedVertex y */ /** - * Constructs a new Polyline. + * Constructs a new NormalizedVertex. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a Polyline. - * @implements IPolyline + * @classdesc Represents a NormalizedVertex. + * @implements INormalizedVertex * @constructor - * @param {google.cloud.datalabeling.v1beta1.IPolyline=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.INormalizedVertex=} [properties] Properties to set */ - function Polyline(properties) { - this.vertices = []; + function NormalizedVertex(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2786,78 +2859,88 @@ } /** - * Polyline vertices. - * @member {Array.} vertices - * @memberof google.cloud.datalabeling.v1beta1.Polyline + * NormalizedVertex x. + * @member {number} x + * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex * @instance */ - Polyline.prototype.vertices = $util.emptyArray; + NormalizedVertex.prototype.x = 0; /** - * Creates a new Polyline instance using the specified properties. + * NormalizedVertex y. + * @member {number} y + * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex + * @instance + */ + NormalizedVertex.prototype.y = 0; + + /** + * Creates a new NormalizedVertex instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.Polyline + * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex * @static - * @param {google.cloud.datalabeling.v1beta1.IPolyline=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.Polyline} Polyline instance + * @param {google.cloud.datalabeling.v1beta1.INormalizedVertex=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.NormalizedVertex} NormalizedVertex instance */ - Polyline.create = function create(properties) { - return new Polyline(properties); + NormalizedVertex.create = function create(properties) { + return new NormalizedVertex(properties); }; /** - * Encodes the specified Polyline message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Polyline.verify|verify} messages. + * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedVertex.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.Polyline + * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex * @static - * @param {google.cloud.datalabeling.v1beta1.IPolyline} message Polyline message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Polyline.encode = function encode(message, writer) { + NormalizedVertex.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.vertices != null && message.vertices.length) - for (var i = 0; i < message.vertices.length; ++i) - $root.google.cloud.datalabeling.v1beta1.Vertex.encode(message.vertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.x != null && message.hasOwnProperty("x")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.x); + if (message.y != null && message.hasOwnProperty("y")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.y); return writer; }; /** - * Encodes the specified Polyline message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Polyline.verify|verify} messages. + * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedVertex.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.Polyline + * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex * @static - * @param {google.cloud.datalabeling.v1beta1.IPolyline} message Polyline message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Polyline.encodeDelimited = function encodeDelimited(message, writer) { + NormalizedVertex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Polyline message from the specified reader or buffer. + * Decodes a NormalizedVertex message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.Polyline + * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.Polyline} Polyline + * @returns {google.cloud.datalabeling.v1beta1.NormalizedVertex} NormalizedVertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Polyline.decode = function decode(reader, length) { + NormalizedVertex.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.Polyline(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.NormalizedVertex(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.vertices && message.vertices.length)) - message.vertices = []; - message.vertices.push($root.google.cloud.datalabeling.v1beta1.Vertex.decode(reader, reader.uint32())); + message.x = reader.float(); + break; + case 2: + message.y = reader.float(); break; default: reader.skipType(tag & 7); @@ -2868,125 +2951,117 @@ }; /** - * Decodes a Polyline message from the specified reader or buffer, length delimited. + * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.Polyline + * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.Polyline} Polyline + * @returns {google.cloud.datalabeling.v1beta1.NormalizedVertex} NormalizedVertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Polyline.decodeDelimited = function decodeDelimited(reader) { + NormalizedVertex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Polyline message. + * Verifies a NormalizedVertex message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.Polyline + * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Polyline.verify = function verify(message) { + NormalizedVertex.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.vertices != null && message.hasOwnProperty("vertices")) { - if (!Array.isArray(message.vertices)) - return "vertices: array expected"; - for (var i = 0; i < message.vertices.length; ++i) { - var error = $root.google.cloud.datalabeling.v1beta1.Vertex.verify(message.vertices[i]); - if (error) - return "vertices." + error; - } - } + if (message.x != null && message.hasOwnProperty("x")) + if (typeof message.x !== "number") + return "x: number expected"; + if (message.y != null && message.hasOwnProperty("y")) + if (typeof message.y !== "number") + return "y: number expected"; return null; }; /** - * Creates a Polyline message from a plain object. Also converts values to their respective internal types. + * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.Polyline + * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.Polyline} Polyline + * @returns {google.cloud.datalabeling.v1beta1.NormalizedVertex} NormalizedVertex */ - Polyline.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.Polyline) + NormalizedVertex.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.NormalizedVertex) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.Polyline(); - if (object.vertices) { - if (!Array.isArray(object.vertices)) - throw TypeError(".google.cloud.datalabeling.v1beta1.Polyline.vertices: array expected"); - message.vertices = []; - for (var i = 0; i < object.vertices.length; ++i) { - if (typeof object.vertices[i] !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.Polyline.vertices: object expected"); - message.vertices[i] = $root.google.cloud.datalabeling.v1beta1.Vertex.fromObject(object.vertices[i]); - } - } + var message = new $root.google.cloud.datalabeling.v1beta1.NormalizedVertex(); + if (object.x != null) + message.x = Number(object.x); + if (object.y != null) + message.y = Number(object.y); return message; }; /** - * Creates a plain object from a Polyline message. Also converts values to other types if specified. + * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.Polyline + * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex * @static - * @param {google.cloud.datalabeling.v1beta1.Polyline} message Polyline + * @param {google.cloud.datalabeling.v1beta1.NormalizedVertex} message NormalizedVertex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Polyline.toObject = function toObject(message, options) { + NormalizedVertex.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.vertices = []; - if (message.vertices && message.vertices.length) { - object.vertices = []; - for (var j = 0; j < message.vertices.length; ++j) - object.vertices[j] = $root.google.cloud.datalabeling.v1beta1.Vertex.toObject(message.vertices[j], options); + if (options.defaults) { + object.x = 0; + object.y = 0; } + if (message.x != null && message.hasOwnProperty("x")) + object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; + if (message.y != null && message.hasOwnProperty("y")) + object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; return object; }; /** - * Converts this Polyline to JSON. + * Converts this NormalizedVertex to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.Polyline + * @memberof google.cloud.datalabeling.v1beta1.NormalizedVertex * @instance * @returns {Object.} JSON object */ - Polyline.prototype.toJSON = function toJSON() { + NormalizedVertex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Polyline; + return NormalizedVertex; })(); - v1beta1.NormalizedPolyline = (function() { + v1beta1.BoundingPoly = (function() { /** - * Properties of a NormalizedPolyline. + * Properties of a BoundingPoly. * @memberof google.cloud.datalabeling.v1beta1 - * @interface INormalizedPolyline - * @property {Array.|null} [normalizedVertices] NormalizedPolyline normalizedVertices + * @interface IBoundingPoly + * @property {Array.|null} [vertices] BoundingPoly vertices */ /** - * Constructs a new NormalizedPolyline. + * Constructs a new BoundingPoly. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a NormalizedPolyline. - * @implements INormalizedPolyline + * @classdesc Represents a BoundingPoly. + * @implements IBoundingPoly * @constructor - * @param {google.cloud.datalabeling.v1beta1.INormalizedPolyline=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IBoundingPoly=} [properties] Properties to set */ - function NormalizedPolyline(properties) { - this.normalizedVertices = []; + function BoundingPoly(properties) { + this.vertices = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2994,78 +3069,78 @@ } /** - * NormalizedPolyline normalizedVertices. - * @member {Array.} normalizedVertices - * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline + * BoundingPoly vertices. + * @member {Array.} vertices + * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly * @instance */ - NormalizedPolyline.prototype.normalizedVertices = $util.emptyArray; + BoundingPoly.prototype.vertices = $util.emptyArray; /** - * Creates a new NormalizedPolyline instance using the specified properties. + * Creates a new BoundingPoly instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline + * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly * @static - * @param {google.cloud.datalabeling.v1beta1.INormalizedPolyline=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.NormalizedPolyline} NormalizedPolyline instance + * @param {google.cloud.datalabeling.v1beta1.IBoundingPoly=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.BoundingPoly} BoundingPoly instance */ - NormalizedPolyline.create = function create(properties) { - return new NormalizedPolyline(properties); + BoundingPoly.create = function create(properties) { + return new BoundingPoly(properties); }; /** - * Encodes the specified NormalizedPolyline message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedPolyline.verify|verify} messages. + * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.BoundingPoly.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline + * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly * @static - * @param {google.cloud.datalabeling.v1beta1.INormalizedPolyline} message NormalizedPolyline message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IBoundingPoly} message BoundingPoly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NormalizedPolyline.encode = function encode(message, writer) { + BoundingPoly.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.normalizedVertices != null && message.normalizedVertices.length) - for (var i = 0; i < message.normalizedVertices.length; ++i) - $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.vertices != null && message.vertices.length) + for (var i = 0; i < message.vertices.length; ++i) + $root.google.cloud.datalabeling.v1beta1.Vertex.encode(message.vertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified NormalizedPolyline message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedPolyline.verify|verify} messages. + * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.BoundingPoly.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline + * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly * @static - * @param {google.cloud.datalabeling.v1beta1.INormalizedPolyline} message NormalizedPolyline message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IBoundingPoly} message BoundingPoly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NormalizedPolyline.encodeDelimited = function encodeDelimited(message, writer) { + BoundingPoly.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NormalizedPolyline message from the specified reader or buffer. + * Decodes a BoundingPoly message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline + * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.NormalizedPolyline} NormalizedPolyline + * @returns {google.cloud.datalabeling.v1beta1.BoundingPoly} BoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NormalizedPolyline.decode = function decode(reader, length) { + BoundingPoly.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.BoundingPoly(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.normalizedVertices && message.normalizedVertices.length)) - message.normalizedVertices = []; - message.normalizedVertices.push($root.google.cloud.datalabeling.v1beta1.NormalizedVertex.decode(reader, reader.uint32())); + if (!(message.vertices && message.vertices.length)) + message.vertices = []; + message.vertices.push($root.google.cloud.datalabeling.v1beta1.Vertex.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3076,126 +3151,125 @@ }; /** - * Decodes a NormalizedPolyline message from the specified reader or buffer, length delimited. + * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline + * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.NormalizedPolyline} NormalizedPolyline + * @returns {google.cloud.datalabeling.v1beta1.BoundingPoly} BoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NormalizedPolyline.decodeDelimited = function decodeDelimited(reader) { + BoundingPoly.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NormalizedPolyline message. + * Verifies a BoundingPoly message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline + * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NormalizedPolyline.verify = function verify(message) { + BoundingPoly.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) { - if (!Array.isArray(message.normalizedVertices)) - return "normalizedVertices: array expected"; - for (var i = 0; i < message.normalizedVertices.length; ++i) { - var error = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.verify(message.normalizedVertices[i]); + if (message.vertices != null && message.hasOwnProperty("vertices")) { + if (!Array.isArray(message.vertices)) + return "vertices: array expected"; + for (var i = 0; i < message.vertices.length; ++i) { + var error = $root.google.cloud.datalabeling.v1beta1.Vertex.verify(message.vertices[i]); if (error) - return "normalizedVertices." + error; + return "vertices." + error; } } return null; }; /** - * Creates a NormalizedPolyline message from a plain object. Also converts values to their respective internal types. + * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline + * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.NormalizedPolyline} NormalizedPolyline + * @returns {google.cloud.datalabeling.v1beta1.BoundingPoly} BoundingPoly */ - NormalizedPolyline.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline) + BoundingPoly.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.BoundingPoly) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline(); - if (object.normalizedVertices) { - if (!Array.isArray(object.normalizedVertices)) - throw TypeError(".google.cloud.datalabeling.v1beta1.NormalizedPolyline.normalizedVertices: array expected"); - message.normalizedVertices = []; - for (var i = 0; i < object.normalizedVertices.length; ++i) { - if (typeof object.normalizedVertices[i] !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.NormalizedPolyline.normalizedVertices: object expected"); - message.normalizedVertices[i] = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.fromObject(object.normalizedVertices[i]); + var message = new $root.google.cloud.datalabeling.v1beta1.BoundingPoly(); + if (object.vertices) { + if (!Array.isArray(object.vertices)) + throw TypeError(".google.cloud.datalabeling.v1beta1.BoundingPoly.vertices: array expected"); + message.vertices = []; + for (var i = 0; i < object.vertices.length; ++i) { + if (typeof object.vertices[i] !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.BoundingPoly.vertices: object expected"); + message.vertices[i] = $root.google.cloud.datalabeling.v1beta1.Vertex.fromObject(object.vertices[i]); } } return message; }; /** - * Creates a plain object from a NormalizedPolyline message. Also converts values to other types if specified. + * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline + * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly * @static - * @param {google.cloud.datalabeling.v1beta1.NormalizedPolyline} message NormalizedPolyline + * @param {google.cloud.datalabeling.v1beta1.BoundingPoly} message BoundingPoly * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NormalizedPolyline.toObject = function toObject(message, options) { + BoundingPoly.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.normalizedVertices = []; - if (message.normalizedVertices && message.normalizedVertices.length) { - object.normalizedVertices = []; - for (var j = 0; j < message.normalizedVertices.length; ++j) - object.normalizedVertices[j] = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.toObject(message.normalizedVertices[j], options); + object.vertices = []; + if (message.vertices && message.vertices.length) { + object.vertices = []; + for (var j = 0; j < message.vertices.length; ++j) + object.vertices[j] = $root.google.cloud.datalabeling.v1beta1.Vertex.toObject(message.vertices[j], options); } return object; }; /** - * Converts this NormalizedPolyline to JSON. + * Converts this BoundingPoly to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline + * @memberof google.cloud.datalabeling.v1beta1.BoundingPoly * @instance * @returns {Object.} JSON object */ - NormalizedPolyline.prototype.toJSON = function toJSON() { + BoundingPoly.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return NormalizedPolyline; + return BoundingPoly; })(); - v1beta1.ImagePolylineAnnotation = (function() { + v1beta1.NormalizedBoundingPoly = (function() { /** - * Properties of an ImagePolylineAnnotation. + * Properties of a NormalizedBoundingPoly. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IImagePolylineAnnotation - * @property {google.cloud.datalabeling.v1beta1.IPolyline|null} [polyline] ImagePolylineAnnotation polyline - * @property {google.cloud.datalabeling.v1beta1.INormalizedPolyline|null} [normalizedPolyline] ImagePolylineAnnotation normalizedPolyline - * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] ImagePolylineAnnotation annotationSpec + * @interface INormalizedBoundingPoly + * @property {Array.|null} [normalizedVertices] NormalizedBoundingPoly normalizedVertices */ /** - * Constructs a new ImagePolylineAnnotation. + * Constructs a new NormalizedBoundingPoly. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an ImagePolylineAnnotation. - * @implements IImagePolylineAnnotation + * @classdesc Represents a NormalizedBoundingPoly. + * @implements INormalizedBoundingPoly * @constructor - * @param {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly=} [properties] Properties to set */ - function ImagePolylineAnnotation(properties) { + function NormalizedBoundingPoly(properties) { + this.normalizedVertices = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3203,115 +3277,78 @@ } /** - * ImagePolylineAnnotation polyline. - * @member {google.cloud.datalabeling.v1beta1.IPolyline|null|undefined} polyline - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation - * @instance - */ - ImagePolylineAnnotation.prototype.polyline = null; - - /** - * ImagePolylineAnnotation normalizedPolyline. - * @member {google.cloud.datalabeling.v1beta1.INormalizedPolyline|null|undefined} normalizedPolyline - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation - * @instance - */ - ImagePolylineAnnotation.prototype.normalizedPolyline = null; - - /** - * ImagePolylineAnnotation annotationSpec. - * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation - * @instance - */ - ImagePolylineAnnotation.prototype.annotationSpec = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ImagePolylineAnnotation poly. - * @member {"polyline"|"normalizedPolyline"|undefined} poly - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * NormalizedBoundingPoly normalizedVertices. + * @member {Array.} normalizedVertices + * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly * @instance */ - Object.defineProperty(ImagePolylineAnnotation.prototype, "poly", { - get: $util.oneOfGetter($oneOfFields = ["polyline", "normalizedPolyline"]), - set: $util.oneOfSetter($oneOfFields) - }); + NormalizedBoundingPoly.prototype.normalizedVertices = $util.emptyArray; /** - * Creates a new ImagePolylineAnnotation instance using the specified properties. + * Creates a new NormalizedBoundingPoly instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly * @static - * @param {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} ImagePolylineAnnotation instance + * @param {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} NormalizedBoundingPoly instance */ - ImagePolylineAnnotation.create = function create(properties) { - return new ImagePolylineAnnotation(properties); + NormalizedBoundingPoly.create = function create(properties) { + return new NormalizedBoundingPoly(properties); }; /** - * Encodes the specified ImagePolylineAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.verify|verify} messages. + * Encodes the specified NormalizedBoundingPoly message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly * @static - * @param {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation} message ImagePolylineAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly} message NormalizedBoundingPoly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImagePolylineAnnotation.encode = function encode(message, writer) { + NormalizedBoundingPoly.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.polyline != null && message.hasOwnProperty("polyline")) - $root.google.cloud.datalabeling.v1beta1.Polyline.encode(message.polyline, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.normalizedPolyline != null && message.hasOwnProperty("normalizedPolyline")) - $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline.encode(message.normalizedPolyline, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.normalizedVertices != null && message.normalizedVertices.length) + for (var i = 0; i < message.normalizedVertices.length; ++i) + $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImagePolylineAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.verify|verify} messages. + * Encodes the specified NormalizedBoundingPoly message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly * @static - * @param {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation} message ImagePolylineAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly} message NormalizedBoundingPoly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImagePolylineAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + NormalizedBoundingPoly.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImagePolylineAnnotation message from the specified reader or buffer. + * Decodes a NormalizedBoundingPoly message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} ImagePolylineAnnotation + * @returns {google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} NormalizedBoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImagePolylineAnnotation.decode = function decode(reader, length) { + NormalizedBoundingPoly.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.polyline = $root.google.cloud.datalabeling.v1beta1.Polyline.decode(reader, reader.uint32()); - break; - case 3: - message.normalizedPolyline = $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline.decode(reader, reader.uint32()); - break; case 1: - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); + if (!(message.normalizedVertices && message.normalizedVertices.length)) + message.normalizedVertices = []; + message.normalizedVertices.push($root.google.cloud.datalabeling.v1beta1.NormalizedVertex.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3322,154 +3359,126 @@ }; /** - * Decodes an ImagePolylineAnnotation message from the specified reader or buffer, length delimited. + * Decodes a NormalizedBoundingPoly message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} ImagePolylineAnnotation + * @returns {google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} NormalizedBoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImagePolylineAnnotation.decodeDelimited = function decodeDelimited(reader) { + NormalizedBoundingPoly.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImagePolylineAnnotation message. + * Verifies a NormalizedBoundingPoly message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImagePolylineAnnotation.verify = function verify(message) { + NormalizedBoundingPoly.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.polyline != null && message.hasOwnProperty("polyline")) { - properties.poly = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.Polyline.verify(message.polyline); - if (error) - return "polyline." + error; - } - } - if (message.normalizedPolyline != null && message.hasOwnProperty("normalizedPolyline")) { - if (properties.poly === 1) - return "poly: multiple values"; - properties.poly = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline.verify(message.normalizedPolyline); + if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) { + if (!Array.isArray(message.normalizedVertices)) + return "normalizedVertices: array expected"; + for (var i = 0; i < message.normalizedVertices.length; ++i) { + var error = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.verify(message.normalizedVertices[i]); if (error) - return "normalizedPolyline." + error; + return "normalizedVertices." + error; } } - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { - var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); - if (error) - return "annotationSpec." + error; - } return null; }; /** - * Creates an ImagePolylineAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a NormalizedBoundingPoly message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} ImagePolylineAnnotation + * @returns {google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} NormalizedBoundingPoly */ - ImagePolylineAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) + NormalizedBoundingPoly.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation(); - if (object.polyline != null) { - if (typeof object.polyline !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.polyline: object expected"); - message.polyline = $root.google.cloud.datalabeling.v1beta1.Polyline.fromObject(object.polyline); - } - if (object.normalizedPolyline != null) { - if (typeof object.normalizedPolyline !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.normalizedPolyline: object expected"); - message.normalizedPolyline = $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline.fromObject(object.normalizedPolyline); - } - if (object.annotationSpec != null) { - if (typeof object.annotationSpec !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.annotationSpec: object expected"); - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); + var message = new $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly(); + if (object.normalizedVertices) { + if (!Array.isArray(object.normalizedVertices)) + throw TypeError(".google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.normalizedVertices: array expected"); + message.normalizedVertices = []; + for (var i = 0; i < object.normalizedVertices.length; ++i) { + if (typeof object.normalizedVertices[i] !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.normalizedVertices: object expected"); + message.normalizedVertices[i] = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.fromObject(object.normalizedVertices[i]); + } } return message; }; /** - * Creates a plain object from an ImagePolylineAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a NormalizedBoundingPoly message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly * @static - * @param {google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} message ImagePolylineAnnotation + * @param {google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly} message NormalizedBoundingPoly * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImagePolylineAnnotation.toObject = function toObject(message, options) { + NormalizedBoundingPoly.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.annotationSpec = null; - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); - if (message.polyline != null && message.hasOwnProperty("polyline")) { - object.polyline = $root.google.cloud.datalabeling.v1beta1.Polyline.toObject(message.polyline, options); - if (options.oneofs) - object.poly = "polyline"; - } - if (message.normalizedPolyline != null && message.hasOwnProperty("normalizedPolyline")) { - object.normalizedPolyline = $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline.toObject(message.normalizedPolyline, options); - if (options.oneofs) - object.poly = "normalizedPolyline"; + if (options.arrays || options.defaults) + object.normalizedVertices = []; + if (message.normalizedVertices && message.normalizedVertices.length) { + object.normalizedVertices = []; + for (var j = 0; j < message.normalizedVertices.length; ++j) + object.normalizedVertices[j] = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.toObject(message.normalizedVertices[j], options); } return object; }; /** - * Converts this ImagePolylineAnnotation to JSON. + * Converts this NormalizedBoundingPoly to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly * @instance * @returns {Object.} JSON object */ - ImagePolylineAnnotation.prototype.toJSON = function toJSON() { + NormalizedBoundingPoly.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImagePolylineAnnotation; + return NormalizedBoundingPoly; })(); - v1beta1.ImageSegmentationAnnotation = (function() { + v1beta1.ImageBoundingPolyAnnotation = (function() { /** - * Properties of an ImageSegmentationAnnotation. + * Properties of an ImageBoundingPolyAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IImageSegmentationAnnotation - * @property {Object.|null} [annotationColors] ImageSegmentationAnnotation annotationColors - * @property {string|null} [mimeType] ImageSegmentationAnnotation mimeType - * @property {Uint8Array|null} [imageBytes] ImageSegmentationAnnotation imageBytes + * @interface IImageBoundingPolyAnnotation + * @property {google.cloud.datalabeling.v1beta1.IBoundingPoly|null} [boundingPoly] ImageBoundingPolyAnnotation boundingPoly + * @property {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null} [normalizedBoundingPoly] ImageBoundingPolyAnnotation normalizedBoundingPoly + * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] ImageBoundingPolyAnnotation annotationSpec */ /** - * Constructs a new ImageSegmentationAnnotation. + * Constructs a new ImageBoundingPolyAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an ImageSegmentationAnnotation. - * @implements IImageSegmentationAnnotation + * @classdesc Represents an ImageBoundingPolyAnnotation. + * @implements IImageBoundingPolyAnnotation * @constructor - * @param {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation=} [properties] Properties to set */ - function ImageSegmentationAnnotation(properties) { - this.annotationColors = {}; + function ImageBoundingPolyAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3477,109 +3486,115 @@ } /** - * ImageSegmentationAnnotation annotationColors. - * @member {Object.} annotationColors - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * ImageBoundingPolyAnnotation boundingPoly. + * @member {google.cloud.datalabeling.v1beta1.IBoundingPoly|null|undefined} boundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation + * @instance + */ + ImageBoundingPolyAnnotation.prototype.boundingPoly = null; + + /** + * ImageBoundingPolyAnnotation normalizedBoundingPoly. + * @member {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null|undefined} normalizedBoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @instance */ - ImageSegmentationAnnotation.prototype.annotationColors = $util.emptyObject; + ImageBoundingPolyAnnotation.prototype.normalizedBoundingPoly = null; /** - * ImageSegmentationAnnotation mimeType. - * @member {string} mimeType - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * ImageBoundingPolyAnnotation annotationSpec. + * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @instance */ - ImageSegmentationAnnotation.prototype.mimeType = ""; + ImageBoundingPolyAnnotation.prototype.annotationSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ImageSegmentationAnnotation imageBytes. - * @member {Uint8Array} imageBytes - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * ImageBoundingPolyAnnotation boundedArea. + * @member {"boundingPoly"|"normalizedBoundingPoly"|undefined} boundedArea + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @instance */ - ImageSegmentationAnnotation.prototype.imageBytes = $util.newBuffer([]); + Object.defineProperty(ImageBoundingPolyAnnotation.prototype, "boundedArea", { + get: $util.oneOfGetter($oneOfFields = ["boundingPoly", "normalizedBoundingPoly"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ImageSegmentationAnnotation instance using the specified properties. + * Creates a new ImageBoundingPolyAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} ImageSegmentationAnnotation instance + * @param {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} ImageBoundingPolyAnnotation instance */ - ImageSegmentationAnnotation.create = function create(properties) { - return new ImageSegmentationAnnotation(properties); + ImageBoundingPolyAnnotation.create = function create(properties) { + return new ImageBoundingPolyAnnotation(properties); }; /** - * Encodes the specified ImageSegmentationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.verify|verify} messages. + * Encodes the specified ImageBoundingPolyAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation} message ImageSegmentationAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation} message ImageBoundingPolyAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageSegmentationAnnotation.encode = function encode(message, writer) { + ImageBoundingPolyAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotationColors != null && message.hasOwnProperty("annotationColors")) - for (var keys = Object.keys(message.annotationColors), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationColors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); - if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.imageBytes); + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) + $root.google.cloud.datalabeling.v1beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) + $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.encode(message.normalizedBoundingPoly, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImageSegmentationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.verify|verify} messages. + * Encodes the specified ImageBoundingPolyAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation} message ImageSegmentationAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IImageBoundingPolyAnnotation} message ImageBoundingPolyAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImageSegmentationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + ImageBoundingPolyAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImageSegmentationAnnotation message from the specified reader or buffer. + * Decodes an ImageBoundingPolyAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} ImageSegmentationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} ImageBoundingPolyAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageSegmentationAnnotation.decode = function decode(reader, length) { + ImageBoundingPolyAnnotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - reader.skip().pos++; - if (message.annotationColors === $util.emptyObject) - message.annotationColors = {}; - key = reader.string(); - reader.pos++; - message.annotationColors[key] = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); - break; case 2: - message.mimeType = reader.string(); + message.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.decode(reader, reader.uint32()); break; case 3: - message.imageBytes = reader.bytes(); + message.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.decode(reader, reader.uint32()); + break; + case 1: + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3590,153 +3605,152 @@ }; /** - * Decodes an ImageSegmentationAnnotation message from the specified reader or buffer, length delimited. + * Decodes an ImageBoundingPolyAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} ImageSegmentationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} ImageBoundingPolyAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImageSegmentationAnnotation.decodeDelimited = function decodeDelimited(reader) { + ImageBoundingPolyAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImageSegmentationAnnotation message. + * Verifies an ImageBoundingPolyAnnotation message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImageSegmentationAnnotation.verify = function verify(message) { + ImageBoundingPolyAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotationColors != null && message.hasOwnProperty("annotationColors")) { - if (!$util.isObject(message.annotationColors)) - return "annotationColors: object expected"; - var key = Object.keys(message.annotationColors); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationColors[key[i]]); + var properties = {}; + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { + properties.boundedArea = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.verify(message.boundingPoly); if (error) - return "annotationColors." + error; + return "boundingPoly." + error; } } - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) - if (!(message.imageBytes && typeof message.imageBytes.length === "number" || $util.isString(message.imageBytes))) - return "imageBytes: buffer expected"; + if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) { + if (properties.boundedArea === 1) + return "boundedArea: multiple values"; + properties.boundedArea = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify(message.normalizedBoundingPoly); + if (error) + return "normalizedBoundingPoly." + error; + } + } + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { + var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); + if (error) + return "annotationSpec." + error; + } return null; }; /** - * Creates an ImageSegmentationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates an ImageBoundingPolyAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} ImageSegmentationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} ImageBoundingPolyAnnotation */ - ImageSegmentationAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) + ImageBoundingPolyAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation(); - if (object.annotationColors) { - if (typeof object.annotationColors !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.annotationColors: object expected"); - message.annotationColors = {}; - for (var keys = Object.keys(object.annotationColors), i = 0; i < keys.length; ++i) { - if (typeof object.annotationColors[keys[i]] !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.annotationColors: object expected"); - message.annotationColors[keys[i]] = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationColors[keys[i]]); - } + var message = new $root.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation(); + if (object.boundingPoly != null) { + if (typeof object.boundingPoly !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.boundingPoly: object expected"); + message.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.fromObject(object.boundingPoly); + } + if (object.normalizedBoundingPoly != null) { + if (typeof object.normalizedBoundingPoly !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.normalizedBoundingPoly: object expected"); + message.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.fromObject(object.normalizedBoundingPoly); + } + if (object.annotationSpec != null) { + if (typeof object.annotationSpec !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation.annotationSpec: object expected"); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); } - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - if (object.imageBytes != null) - if (typeof object.imageBytes === "string") - $util.base64.decode(object.imageBytes, message.imageBytes = $util.newBuffer($util.base64.length(object.imageBytes)), 0); - else if (object.imageBytes.length) - message.imageBytes = object.imageBytes; return message; }; /** - * Creates a plain object from an ImageSegmentationAnnotation message. Also converts values to other types if specified. + * Creates a plain object from an ImageBoundingPolyAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} message ImageSegmentationAnnotation + * @param {google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation} message ImageBoundingPolyAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImageSegmentationAnnotation.toObject = function toObject(message, options) { + ImageBoundingPolyAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.annotationColors = {}; - if (options.defaults) { - object.mimeType = ""; - if (options.bytes === String) - object.imageBytes = ""; - else { - object.imageBytes = []; - if (options.bytes !== Array) - object.imageBytes = $util.newBuffer(object.imageBytes); - } + if (options.defaults) + object.annotationSpec = null; + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { + object.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.toObject(message.boundingPoly, options); + if (options.oneofs) + object.boundedArea = "boundingPoly"; } - var keys2; - if (message.annotationColors && (keys2 = Object.keys(message.annotationColors)).length) { - object.annotationColors = {}; - for (var j = 0; j < keys2.length; ++j) - object.annotationColors[keys2[j]] = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationColors[keys2[j]], options); + if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) { + object.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.toObject(message.normalizedBoundingPoly, options); + if (options.oneofs) + object.boundedArea = "normalizedBoundingPoly"; } - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) - object.imageBytes = options.bytes === String ? $util.base64.encode(message.imageBytes, 0, message.imageBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.imageBytes) : message.imageBytes; return object; }; /** - * Converts this ImageSegmentationAnnotation to JSON. + * Converts this ImageBoundingPolyAnnotation to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation * @instance * @returns {Object.} JSON object */ - ImageSegmentationAnnotation.prototype.toJSON = function toJSON() { + ImageBoundingPolyAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImageSegmentationAnnotation; + return ImageBoundingPolyAnnotation; })(); - v1beta1.TextClassificationAnnotation = (function() { + v1beta1.Polyline = (function() { /** - * Properties of a TextClassificationAnnotation. + * Properties of a Polyline. * @memberof google.cloud.datalabeling.v1beta1 - * @interface ITextClassificationAnnotation - * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] TextClassificationAnnotation annotationSpec + * @interface IPolyline + * @property {Array.|null} [vertices] Polyline vertices */ /** - * Constructs a new TextClassificationAnnotation. - * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a TextClassificationAnnotation. - * @implements ITextClassificationAnnotation + * Constructs a new Polyline. + * @memberof google.cloud.datalabeling.v1beta1 + * @classdesc Represents a Polyline. + * @implements IPolyline * @constructor - * @param {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IPolyline=} [properties] Properties to set */ - function TextClassificationAnnotation(properties) { + function Polyline(properties) { + this.vertices = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3744,75 +3758,78 @@ } /** - * TextClassificationAnnotation annotationSpec. - * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec - * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + * Polyline vertices. + * @member {Array.} vertices + * @memberof google.cloud.datalabeling.v1beta1.Polyline * @instance */ - TextClassificationAnnotation.prototype.annotationSpec = null; + Polyline.prototype.vertices = $util.emptyArray; /** - * Creates a new TextClassificationAnnotation instance using the specified properties. + * Creates a new Polyline instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Polyline * @static - * @param {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} TextClassificationAnnotation instance + * @param {google.cloud.datalabeling.v1beta1.IPolyline=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.Polyline} Polyline instance */ - TextClassificationAnnotation.create = function create(properties) { - return new TextClassificationAnnotation(properties); + Polyline.create = function create(properties) { + return new Polyline(properties); }; /** - * Encodes the specified TextClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.verify|verify} messages. + * Encodes the specified Polyline message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Polyline.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Polyline * @static - * @param {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation} message TextClassificationAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IPolyline} message Polyline message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextClassificationAnnotation.encode = function encode(message, writer) { + Polyline.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.vertices != null && message.vertices.length) + for (var i = 0; i < message.vertices.length; ++i) + $root.google.cloud.datalabeling.v1beta1.Vertex.encode(message.vertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.verify|verify} messages. + * Encodes the specified Polyline message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.Polyline.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Polyline * @static - * @param {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation} message TextClassificationAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IPolyline} message Polyline message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + Polyline.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextClassificationAnnotation message from the specified reader or buffer. + * Decodes a Polyline message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Polyline * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} TextClassificationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.Polyline} Polyline * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextClassificationAnnotation.decode = function decode(reader, length) { + Polyline.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.Polyline(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); + if (!(message.vertices && message.vertices.length)) + message.vertices = []; + message.vertices.push($root.google.cloud.datalabeling.v1beta1.Vertex.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3823,113 +3840,125 @@ }; /** - * Decodes a TextClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes a Polyline message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Polyline * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} TextClassificationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.Polyline} Polyline * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { + Polyline.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextClassificationAnnotation message. + * Verifies a Polyline message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Polyline * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextClassificationAnnotation.verify = function verify(message) { + Polyline.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { - var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); - if (error) - return "annotationSpec." + error; + if (message.vertices != null && message.hasOwnProperty("vertices")) { + if (!Array.isArray(message.vertices)) + return "vertices: array expected"; + for (var i = 0; i < message.vertices.length; ++i) { + var error = $root.google.cloud.datalabeling.v1beta1.Vertex.verify(message.vertices[i]); + if (error) + return "vertices." + error; + } } return null; }; /** - * Creates a TextClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a Polyline message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Polyline * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} TextClassificationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.Polyline} Polyline */ - TextClassificationAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) + Polyline.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.Polyline) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation(); - if (object.annotationSpec != null) { - if (typeof object.annotationSpec !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.annotationSpec: object expected"); - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); + var message = new $root.google.cloud.datalabeling.v1beta1.Polyline(); + if (object.vertices) { + if (!Array.isArray(object.vertices)) + throw TypeError(".google.cloud.datalabeling.v1beta1.Polyline.vertices: array expected"); + message.vertices = []; + for (var i = 0; i < object.vertices.length; ++i) { + if (typeof object.vertices[i] !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.Polyline.vertices: object expected"); + message.vertices[i] = $root.google.cloud.datalabeling.v1beta1.Vertex.fromObject(object.vertices[i]); + } } return message; }; /** - * Creates a plain object from a TextClassificationAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a Polyline message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Polyline * @static - * @param {google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} message TextClassificationAnnotation + * @param {google.cloud.datalabeling.v1beta1.Polyline} message Polyline * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextClassificationAnnotation.toObject = function toObject(message, options) { + Polyline.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.annotationSpec = null; - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); + if (options.arrays || options.defaults) + object.vertices = []; + if (message.vertices && message.vertices.length) { + object.vertices = []; + for (var j = 0; j < message.vertices.length; ++j) + object.vertices[j] = $root.google.cloud.datalabeling.v1beta1.Vertex.toObject(message.vertices[j], options); + } return object; }; /** - * Converts this TextClassificationAnnotation to JSON. + * Converts this Polyline to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.Polyline * @instance * @returns {Object.} JSON object */ - TextClassificationAnnotation.prototype.toJSON = function toJSON() { + Polyline.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextClassificationAnnotation; + return Polyline; })(); - v1beta1.TextEntityExtractionAnnotation = (function() { + v1beta1.NormalizedPolyline = (function() { /** - * Properties of a TextEntityExtractionAnnotation. + * Properties of a NormalizedPolyline. * @memberof google.cloud.datalabeling.v1beta1 - * @interface ITextEntityExtractionAnnotation - * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] TextEntityExtractionAnnotation annotationSpec - * @property {google.cloud.datalabeling.v1beta1.ISequentialSegment|null} [sequentialSegment] TextEntityExtractionAnnotation sequentialSegment + * @interface INormalizedPolyline + * @property {Array.|null} [normalizedVertices] NormalizedPolyline normalizedVertices */ /** - * Constructs a new TextEntityExtractionAnnotation. + * Constructs a new NormalizedPolyline. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a TextEntityExtractionAnnotation. - * @implements ITextEntityExtractionAnnotation + * @classdesc Represents a NormalizedPolyline. + * @implements INormalizedPolyline * @constructor - * @param {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.INormalizedPolyline=} [properties] Properties to set */ - function TextEntityExtractionAnnotation(properties) { + function NormalizedPolyline(properties) { + this.normalizedVertices = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3937,88 +3966,78 @@ } /** - * TextEntityExtractionAnnotation annotationSpec. - * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec - * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation - * @instance - */ - TextEntityExtractionAnnotation.prototype.annotationSpec = null; - - /** - * TextEntityExtractionAnnotation sequentialSegment. - * @member {google.cloud.datalabeling.v1beta1.ISequentialSegment|null|undefined} sequentialSegment - * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + * NormalizedPolyline normalizedVertices. + * @member {Array.} normalizedVertices + * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline * @instance */ - TextEntityExtractionAnnotation.prototype.sequentialSegment = null; + NormalizedPolyline.prototype.normalizedVertices = $util.emptyArray; /** - * Creates a new TextEntityExtractionAnnotation instance using the specified properties. + * Creates a new NormalizedPolyline instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline * @static - * @param {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation} TextEntityExtractionAnnotation instance + * @param {google.cloud.datalabeling.v1beta1.INormalizedPolyline=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.NormalizedPolyline} NormalizedPolyline instance */ - TextEntityExtractionAnnotation.create = function create(properties) { - return new TextEntityExtractionAnnotation(properties); + NormalizedPolyline.create = function create(properties) { + return new NormalizedPolyline(properties); }; /** - * Encodes the specified TextEntityExtractionAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.verify|verify} messages. + * Encodes the specified NormalizedPolyline message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedPolyline.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline * @static - * @param {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation} message TextEntityExtractionAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.INormalizedPolyline} message NormalizedPolyline message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextEntityExtractionAnnotation.encode = function encode(message, writer) { + NormalizedPolyline.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.sequentialSegment != null && message.hasOwnProperty("sequentialSegment")) - $root.google.cloud.datalabeling.v1beta1.SequentialSegment.encode(message.sequentialSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.normalizedVertices != null && message.normalizedVertices.length) + for (var i = 0; i < message.normalizedVertices.length; ++i) + $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextEntityExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.verify|verify} messages. + * Encodes the specified NormalizedPolyline message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.NormalizedPolyline.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline * @static - * @param {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation} message TextEntityExtractionAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.INormalizedPolyline} message NormalizedPolyline message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextEntityExtractionAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + NormalizedPolyline.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextEntityExtractionAnnotation message from the specified reader or buffer. + * Decodes a NormalizedPolyline message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation} TextEntityExtractionAnnotation + * @returns {google.cloud.datalabeling.v1beta1.NormalizedPolyline} NormalizedPolyline * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextEntityExtractionAnnotation.decode = function decode(reader, length) { + NormalizedPolyline.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); - break; - case 2: - message.sequentialSegment = $root.google.cloud.datalabeling.v1beta1.SequentialSegment.decode(reader, reader.uint32()); + if (!(message.normalizedVertices && message.normalizedVertices.length)) + message.normalizedVertices = []; + message.normalizedVertices.push($root.google.cloud.datalabeling.v1beta1.NormalizedVertex.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -4029,127 +4048,126 @@ }; /** - * Decodes a TextEntityExtractionAnnotation message from the specified reader or buffer, length delimited. + * Decodes a NormalizedPolyline message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation} TextEntityExtractionAnnotation + * @returns {google.cloud.datalabeling.v1beta1.NormalizedPolyline} NormalizedPolyline * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextEntityExtractionAnnotation.decodeDelimited = function decodeDelimited(reader) { + NormalizedPolyline.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextEntityExtractionAnnotation message. + * Verifies a NormalizedPolyline message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextEntityExtractionAnnotation.verify = function verify(message) { + NormalizedPolyline.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { - var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); - if (error) - return "annotationSpec." + error; - } - if (message.sequentialSegment != null && message.hasOwnProperty("sequentialSegment")) { - var error = $root.google.cloud.datalabeling.v1beta1.SequentialSegment.verify(message.sequentialSegment); - if (error) - return "sequentialSegment." + error; + if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) { + if (!Array.isArray(message.normalizedVertices)) + return "normalizedVertices: array expected"; + for (var i = 0; i < message.normalizedVertices.length; ++i) { + var error = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.verify(message.normalizedVertices[i]); + if (error) + return "normalizedVertices." + error; + } } return null; }; /** - * Creates a TextEntityExtractionAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a NormalizedPolyline message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation} TextEntityExtractionAnnotation + * @returns {google.cloud.datalabeling.v1beta1.NormalizedPolyline} NormalizedPolyline */ - TextEntityExtractionAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation) + NormalizedPolyline.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation(); - if (object.annotationSpec != null) { - if (typeof object.annotationSpec !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.annotationSpec: object expected"); - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); - } - if (object.sequentialSegment != null) { - if (typeof object.sequentialSegment !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.sequentialSegment: object expected"); - message.sequentialSegment = $root.google.cloud.datalabeling.v1beta1.SequentialSegment.fromObject(object.sequentialSegment); + var message = new $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline(); + if (object.normalizedVertices) { + if (!Array.isArray(object.normalizedVertices)) + throw TypeError(".google.cloud.datalabeling.v1beta1.NormalizedPolyline.normalizedVertices: array expected"); + message.normalizedVertices = []; + for (var i = 0; i < object.normalizedVertices.length; ++i) { + if (typeof object.normalizedVertices[i] !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.NormalizedPolyline.normalizedVertices: object expected"); + message.normalizedVertices[i] = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.fromObject(object.normalizedVertices[i]); + } } return message; }; /** - * Creates a plain object from a TextEntityExtractionAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a NormalizedPolyline message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline * @static - * @param {google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation} message TextEntityExtractionAnnotation + * @param {google.cloud.datalabeling.v1beta1.NormalizedPolyline} message NormalizedPolyline * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextEntityExtractionAnnotation.toObject = function toObject(message, options) { + NormalizedPolyline.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.annotationSpec = null; - object.sequentialSegment = null; + if (options.arrays || options.defaults) + object.normalizedVertices = []; + if (message.normalizedVertices && message.normalizedVertices.length) { + object.normalizedVertices = []; + for (var j = 0; j < message.normalizedVertices.length; ++j) + object.normalizedVertices[j] = $root.google.cloud.datalabeling.v1beta1.NormalizedVertex.toObject(message.normalizedVertices[j], options); } - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); - if (message.sequentialSegment != null && message.hasOwnProperty("sequentialSegment")) - object.sequentialSegment = $root.google.cloud.datalabeling.v1beta1.SequentialSegment.toObject(message.sequentialSegment, options); return object; }; /** - * Converts this TextEntityExtractionAnnotation to JSON. + * Converts this NormalizedPolyline to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation + * @memberof google.cloud.datalabeling.v1beta1.NormalizedPolyline * @instance * @returns {Object.} JSON object */ - TextEntityExtractionAnnotation.prototype.toJSON = function toJSON() { + NormalizedPolyline.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextEntityExtractionAnnotation; + return NormalizedPolyline; })(); - v1beta1.SequentialSegment = (function() { + v1beta1.ImagePolylineAnnotation = (function() { /** - * Properties of a SequentialSegment. + * Properties of an ImagePolylineAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @interface ISequentialSegment - * @property {number|null} [start] SequentialSegment start - * @property {number|null} [end] SequentialSegment end + * @interface IImagePolylineAnnotation + * @property {google.cloud.datalabeling.v1beta1.IPolyline|null} [polyline] ImagePolylineAnnotation polyline + * @property {google.cloud.datalabeling.v1beta1.INormalizedPolyline|null} [normalizedPolyline] ImagePolylineAnnotation normalizedPolyline + * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] ImagePolylineAnnotation annotationSpec */ /** - * Constructs a new SequentialSegment. + * Constructs a new ImagePolylineAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a SequentialSegment. - * @implements ISequentialSegment + * @classdesc Represents an ImagePolylineAnnotation. + * @implements IImagePolylineAnnotation * @constructor - * @param {google.cloud.datalabeling.v1beta1.ISequentialSegment=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation=} [properties] Properties to set */ - function SequentialSegment(properties) { + function ImagePolylineAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4157,88 +4175,115 @@ } /** - * SequentialSegment start. - * @member {number} start - * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * ImagePolylineAnnotation polyline. + * @member {google.cloud.datalabeling.v1beta1.IPolyline|null|undefined} polyline + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation * @instance */ - SequentialSegment.prototype.start = 0; + ImagePolylineAnnotation.prototype.polyline = null; /** - * SequentialSegment end. - * @member {number} end - * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * ImagePolylineAnnotation normalizedPolyline. + * @member {google.cloud.datalabeling.v1beta1.INormalizedPolyline|null|undefined} normalizedPolyline + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation * @instance */ - SequentialSegment.prototype.end = 0; + ImagePolylineAnnotation.prototype.normalizedPolyline = null; /** - * Creates a new SequentialSegment instance using the specified properties. + * ImagePolylineAnnotation annotationSpec. + * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * @instance + */ + ImagePolylineAnnotation.prototype.annotationSpec = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImagePolylineAnnotation poly. + * @member {"polyline"|"normalizedPolyline"|undefined} poly + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation + * @instance + */ + Object.defineProperty(ImagePolylineAnnotation.prototype, "poly", { + get: $util.oneOfGetter($oneOfFields = ["polyline", "normalizedPolyline"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImagePolylineAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ISequentialSegment=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.SequentialSegment} SequentialSegment instance + * @param {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} ImagePolylineAnnotation instance */ - SequentialSegment.create = function create(properties) { - return new SequentialSegment(properties); + ImagePolylineAnnotation.create = function create(properties) { + return new ImagePolylineAnnotation(properties); }; /** - * Encodes the specified SequentialSegment message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.SequentialSegment.verify|verify} messages. + * Encodes the specified ImagePolylineAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ISequentialSegment} message SequentialSegment message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation} message ImagePolylineAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SequentialSegment.encode = function encode(message, writer) { + ImagePolylineAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.polyline != null && message.hasOwnProperty("polyline")) + $root.google.cloud.datalabeling.v1beta1.Polyline.encode(message.polyline, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.normalizedPolyline != null && message.hasOwnProperty("normalizedPolyline")) + $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline.encode(message.normalizedPolyline, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified SequentialSegment message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.SequentialSegment.verify|verify} messages. + * Encodes the specified ImagePolylineAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ISequentialSegment} message SequentialSegment message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IImagePolylineAnnotation} message ImagePolylineAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SequentialSegment.encodeDelimited = function encodeDelimited(message, writer) { + ImagePolylineAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SequentialSegment message from the specified reader or buffer. + * Decodes an ImagePolylineAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.SequentialSegment} SequentialSegment + * @returns {google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} ImagePolylineAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SequentialSegment.decode = function decode(reader, length) { + ImagePolylineAnnotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.SequentialSegment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; case 2: - message.end = reader.int32(); + message.polyline = $root.google.cloud.datalabeling.v1beta1.Polyline.decode(reader, reader.uint32()); + break; + case 3: + message.normalizedPolyline = $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline.decode(reader, reader.uint32()); + break; + case 1: + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4249,117 +4294,154 @@ }; /** - * Decodes a SequentialSegment message from the specified reader or buffer, length delimited. + * Decodes an ImagePolylineAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.SequentialSegment} SequentialSegment + * @returns {google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} ImagePolylineAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SequentialSegment.decodeDelimited = function decodeDelimited(reader) { + ImagePolylineAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SequentialSegment message. + * Verifies an ImagePolylineAnnotation message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SequentialSegment.verify = function verify(message) { + ImagePolylineAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; + var properties = {}; + if (message.polyline != null && message.hasOwnProperty("polyline")) { + properties.poly = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.Polyline.verify(message.polyline); + if (error) + return "polyline." + error; + } + } + if (message.normalizedPolyline != null && message.hasOwnProperty("normalizedPolyline")) { + if (properties.poly === 1) + return "poly: multiple values"; + properties.poly = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline.verify(message.normalizedPolyline); + if (error) + return "normalizedPolyline." + error; + } + } + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { + var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); + if (error) + return "annotationSpec." + error; + } return null; }; /** - * Creates a SequentialSegment message from a plain object. Also converts values to their respective internal types. + * Creates an ImagePolylineAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.SequentialSegment} SequentialSegment + * @returns {google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} ImagePolylineAnnotation */ - SequentialSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.SequentialSegment) + ImagePolylineAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.SequentialSegment(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; + var message = new $root.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation(); + if (object.polyline != null) { + if (typeof object.polyline !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.polyline: object expected"); + message.polyline = $root.google.cloud.datalabeling.v1beta1.Polyline.fromObject(object.polyline); + } + if (object.normalizedPolyline != null) { + if (typeof object.normalizedPolyline !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.normalizedPolyline: object expected"); + message.normalizedPolyline = $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline.fromObject(object.normalizedPolyline); + } + if (object.annotationSpec != null) { + if (typeof object.annotationSpec !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation.annotationSpec: object expected"); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); + } return message; }; /** - * Creates a plain object from a SequentialSegment message. Also converts values to other types if specified. + * Creates a plain object from an ImagePolylineAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.SequentialSegment} message SequentialSegment + * @param {google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation} message ImagePolylineAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SequentialSegment.toObject = function toObject(message, options) { + ImagePolylineAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; + if (options.defaults) + object.annotationSpec = null; + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); + if (message.polyline != null && message.hasOwnProperty("polyline")) { + object.polyline = $root.google.cloud.datalabeling.v1beta1.Polyline.toObject(message.polyline, options); + if (options.oneofs) + object.poly = "polyline"; + } + if (message.normalizedPolyline != null && message.hasOwnProperty("normalizedPolyline")) { + object.normalizedPolyline = $root.google.cloud.datalabeling.v1beta1.NormalizedPolyline.toObject(message.normalizedPolyline, options); + if (options.oneofs) + object.poly = "normalizedPolyline"; } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; return object; }; /** - * Converts this SequentialSegment to JSON. + * Converts this ImagePolylineAnnotation to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * @memberof google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation * @instance * @returns {Object.} JSON object */ - SequentialSegment.prototype.toJSON = function toJSON() { + ImagePolylineAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SequentialSegment; + return ImagePolylineAnnotation; })(); - v1beta1.TimeSegment = (function() { + v1beta1.ImageSegmentationAnnotation = (function() { /** - * Properties of a TimeSegment. + * Properties of an ImageSegmentationAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @interface ITimeSegment - * @property {google.protobuf.IDuration|null} [startTimeOffset] TimeSegment startTimeOffset - * @property {google.protobuf.IDuration|null} [endTimeOffset] TimeSegment endTimeOffset + * @interface IImageSegmentationAnnotation + * @property {Object.|null} [annotationColors] ImageSegmentationAnnotation annotationColors + * @property {string|null} [mimeType] ImageSegmentationAnnotation mimeType + * @property {Uint8Array|null} [imageBytes] ImageSegmentationAnnotation imageBytes */ /** - * Constructs a new TimeSegment. + * Constructs a new ImageSegmentationAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a TimeSegment. - * @implements ITimeSegment + * @classdesc Represents an ImageSegmentationAnnotation. + * @implements IImageSegmentationAnnotation * @constructor - * @param {google.cloud.datalabeling.v1beta1.ITimeSegment=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation=} [properties] Properties to set */ - function TimeSegment(properties) { + function ImageSegmentationAnnotation(properties) { + this.annotationColors = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4367,88 +4449,109 @@ } /** - * TimeSegment startTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} startTimeOffset - * @memberof google.cloud.datalabeling.v1beta1.TimeSegment + * ImageSegmentationAnnotation annotationColors. + * @member {Object.} annotationColors + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation * @instance */ - TimeSegment.prototype.startTimeOffset = null; + ImageSegmentationAnnotation.prototype.annotationColors = $util.emptyObject; /** - * TimeSegment endTimeOffset. - * @member {google.protobuf.IDuration|null|undefined} endTimeOffset - * @memberof google.cloud.datalabeling.v1beta1.TimeSegment + * ImageSegmentationAnnotation mimeType. + * @member {string} mimeType + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation * @instance */ - TimeSegment.prototype.endTimeOffset = null; + ImageSegmentationAnnotation.prototype.mimeType = ""; /** - * Creates a new TimeSegment instance using the specified properties. + * ImageSegmentationAnnotation imageBytes. + * @member {Uint8Array} imageBytes + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation + * @instance + */ + ImageSegmentationAnnotation.prototype.imageBytes = $util.newBuffer([]); + + /** + * Creates a new ImageSegmentationAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.TimeSegment + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ITimeSegment=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.TimeSegment} TimeSegment instance + * @param {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} ImageSegmentationAnnotation instance */ - TimeSegment.create = function create(properties) { - return new TimeSegment(properties); + ImageSegmentationAnnotation.create = function create(properties) { + return new ImageSegmentationAnnotation(properties); }; /** - * Encodes the specified TimeSegment message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TimeSegment.verify|verify} messages. + * Encodes the specified ImageSegmentationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.TimeSegment + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ITimeSegment} message TimeSegment message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation} message ImageSegmentationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSegment.encode = function encode(message, writer) { + ImageSegmentationAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) - $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) - $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.annotationColors != null && message.hasOwnProperty("annotationColors")) + for (var keys = Object.keys(message.annotationColors), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationColors[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType); + if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.imageBytes); return writer; }; /** - * Encodes the specified TimeSegment message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TimeSegment.verify|verify} messages. + * Encodes the specified ImageSegmentationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.TimeSegment + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ITimeSegment} message TimeSegment message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IImageSegmentationAnnotation} message ImageSegmentationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TimeSegment.encodeDelimited = function encodeDelimited(message, writer) { + ImageSegmentationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TimeSegment message from the specified reader or buffer. + * Decodes an ImageSegmentationAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.TimeSegment + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.TimeSegment} TimeSegment + * @returns {google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} ImageSegmentationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSegment.decode = function decode(reader, length) { + ImageSegmentationAnnotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.TimeSegment(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + reader.skip().pos++; + if (message.annotationColors === $util.emptyObject) + message.annotationColors = {}; + key = reader.string(); + reader.pos++; + message.annotationColors[key] = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); break; case 2: - message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.mimeType = reader.string(); + break; + case 3: + message.imageBytes = reader.bytes(); break; default: reader.skipType(tag & 7); @@ -4459,127 +4562,153 @@ }; /** - * Decodes a TimeSegment message from the specified reader or buffer, length delimited. + * Decodes an ImageSegmentationAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.TimeSegment + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.TimeSegment} TimeSegment + * @returns {google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} ImageSegmentationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TimeSegment.decodeDelimited = function decodeDelimited(reader) { + ImageSegmentationAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TimeSegment message. + * Verifies an ImageSegmentationAnnotation message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.TimeSegment + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TimeSegment.verify = function verify(message) { + ImageSegmentationAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); - if (error) - return "startTimeOffset." + error; - } - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); - if (error) - return "endTimeOffset." + error; + if (message.annotationColors != null && message.hasOwnProperty("annotationColors")) { + if (!$util.isObject(message.annotationColors)) + return "annotationColors: object expected"; + var key = Object.keys(message.annotationColors); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationColors[key[i]]); + if (error) + return "annotationColors." + error; + } } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + if (!$util.isString(message.mimeType)) + return "mimeType: string expected"; + if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) + if (!(message.imageBytes && typeof message.imageBytes.length === "number" || $util.isString(message.imageBytes))) + return "imageBytes: buffer expected"; return null; }; /** - * Creates a TimeSegment message from a plain object. Also converts values to their respective internal types. + * Creates an ImageSegmentationAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.TimeSegment + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.TimeSegment} TimeSegment + * @returns {google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} ImageSegmentationAnnotation */ - TimeSegment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.TimeSegment) + ImageSegmentationAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.TimeSegment(); - if (object.startTimeOffset != null) { - if (typeof object.startTimeOffset !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.TimeSegment.startTimeOffset: object expected"); - message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); - } - if (object.endTimeOffset != null) { - if (typeof object.endTimeOffset !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.TimeSegment.endTimeOffset: object expected"); - message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); + var message = new $root.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation(); + if (object.annotationColors) { + if (typeof object.annotationColors !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.annotationColors: object expected"); + message.annotationColors = {}; + for (var keys = Object.keys(object.annotationColors), i = 0; i < keys.length; ++i) { + if (typeof object.annotationColors[keys[i]] !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation.annotationColors: object expected"); + message.annotationColors[keys[i]] = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationColors[keys[i]]); + } } + if (object.mimeType != null) + message.mimeType = String(object.mimeType); + if (object.imageBytes != null) + if (typeof object.imageBytes === "string") + $util.base64.decode(object.imageBytes, message.imageBytes = $util.newBuffer($util.base64.length(object.imageBytes)), 0); + else if (object.imageBytes.length) + message.imageBytes = object.imageBytes; return message; }; /** - * Creates a plain object from a TimeSegment message. Also converts values to other types if specified. + * Creates a plain object from an ImageSegmentationAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.TimeSegment + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.TimeSegment} message TimeSegment + * @param {google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation} message ImageSegmentationAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TimeSegment.toObject = function toObject(message, options) { + ImageSegmentationAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.annotationColors = {}; if (options.defaults) { - object.startTimeOffset = null; - object.endTimeOffset = null; + object.mimeType = ""; + if (options.bytes === String) + object.imageBytes = ""; + else { + object.imageBytes = []; + if (options.bytes !== Array) + object.imageBytes = $util.newBuffer(object.imageBytes); + } } - if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) - object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); - if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) - object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); + var keys2; + if (message.annotationColors && (keys2 = Object.keys(message.annotationColors)).length) { + object.annotationColors = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotationColors[keys2[j]] = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationColors[keys2[j]], options); + } + if (message.mimeType != null && message.hasOwnProperty("mimeType")) + object.mimeType = message.mimeType; + if (message.imageBytes != null && message.hasOwnProperty("imageBytes")) + object.imageBytes = options.bytes === String ? $util.base64.encode(message.imageBytes, 0, message.imageBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.imageBytes) : message.imageBytes; return object; }; /** - * Converts this TimeSegment to JSON. + * Converts this ImageSegmentationAnnotation to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.TimeSegment + * @memberof google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation * @instance * @returns {Object.} JSON object */ - TimeSegment.prototype.toJSON = function toJSON() { + ImageSegmentationAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TimeSegment; + return ImageSegmentationAnnotation; })(); - v1beta1.VideoClassificationAnnotation = (function() { + v1beta1.TextClassificationAnnotation = (function() { /** - * Properties of a VideoClassificationAnnotation. + * Properties of a TextClassificationAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IVideoClassificationAnnotation - * @property {google.cloud.datalabeling.v1beta1.ITimeSegment|null} [timeSegment] VideoClassificationAnnotation timeSegment - * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] VideoClassificationAnnotation annotationSpec + * @interface ITextClassificationAnnotation + * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] TextClassificationAnnotation annotationSpec */ /** - * Constructs a new VideoClassificationAnnotation. + * Constructs a new TextClassificationAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a VideoClassificationAnnotation. - * @implements IVideoClassificationAnnotation + * @classdesc Represents a TextClassificationAnnotation. + * @implements ITextClassificationAnnotation * @constructor - * @param {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation=} [properties] Properties to set */ - function VideoClassificationAnnotation(properties) { + function TextClassificationAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4587,87 +4716,74 @@ } /** - * VideoClassificationAnnotation timeSegment. - * @member {google.cloud.datalabeling.v1beta1.ITimeSegment|null|undefined} timeSegment - * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation - * @instance - */ - VideoClassificationAnnotation.prototype.timeSegment = null; - - /** - * VideoClassificationAnnotation annotationSpec. + * TextClassificationAnnotation annotationSpec. * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec - * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation * @instance */ - VideoClassificationAnnotation.prototype.annotationSpec = null; + TextClassificationAnnotation.prototype.annotationSpec = null; /** - * Creates a new VideoClassificationAnnotation instance using the specified properties. + * Creates a new TextClassificationAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation instance + * @param {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} TextClassificationAnnotation instance */ - VideoClassificationAnnotation.create = function create(properties) { - return new VideoClassificationAnnotation(properties); + TextClassificationAnnotation.create = function create(properties) { + return new TextClassificationAnnotation(properties); }; /** - * Encodes the specified VideoClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.verify|verify} messages. + * Encodes the specified TextClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation} message VideoClassificationAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation} message TextClassificationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoClassificationAnnotation.encode = function encode(message, writer) { + TextClassificationAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) - $root.google.cloud.datalabeling.v1beta1.TimeSegment.encode(message.timeSegment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified VideoClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.verify|verify} messages. + * Encodes the specified TextClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation} message VideoClassificationAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.ITextClassificationAnnotation} message TextClassificationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + TextClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoClassificationAnnotation message from the specified reader or buffer. + * Decodes a TextClassificationAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} TextClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoClassificationAnnotation.decode = function decode(reader, length) { + TextClassificationAnnotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.decode(reader, reader.uint32()); - break; - case 2: message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); break; default: @@ -4679,37 +4795,32 @@ }; /** - * Decodes a VideoClassificationAnnotation message from the specified reader or buffer, length delimited. + * Decodes a TextClassificationAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} TextClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { + TextClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoClassificationAnnotation message. + * Verifies a TextClassificationAnnotation message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoClassificationAnnotation.verify = function verify(message) { + TextClassificationAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) { - var error = $root.google.cloud.datalabeling.v1beta1.TimeSegment.verify(message.timeSegment); - if (error) - return "timeSegment." + error; - } if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); if (error) @@ -4719,88 +4830,78 @@ }; /** - * Creates a VideoClassificationAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a TextClassificationAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation + * @returns {google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} TextClassificationAnnotation */ - VideoClassificationAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) + TextClassificationAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation(); - if (object.timeSegment != null) { - if (typeof object.timeSegment !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.timeSegment: object expected"); - message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.fromObject(object.timeSegment); - } + var message = new $root.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation(); if (object.annotationSpec != null) { if (typeof object.annotationSpec !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.annotationSpec: object expected"); + throw TypeError(".google.cloud.datalabeling.v1beta1.TextClassificationAnnotation.annotationSpec: object expected"); message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); } return message; }; /** - * Creates a plain object from a VideoClassificationAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a TextClassificationAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} message VideoClassificationAnnotation + * @param {google.cloud.datalabeling.v1beta1.TextClassificationAnnotation} message TextClassificationAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoClassificationAnnotation.toObject = function toObject(message, options) { + TextClassificationAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.timeSegment = null; + if (options.defaults) object.annotationSpec = null; - } - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) - object.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.toObject(message.timeSegment, options); if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); return object; }; /** - * Converts this VideoClassificationAnnotation to JSON. + * Converts this TextClassificationAnnotation to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TextClassificationAnnotation * @instance * @returns {Object.} JSON object */ - VideoClassificationAnnotation.prototype.toJSON = function toJSON() { + TextClassificationAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VideoClassificationAnnotation; + return TextClassificationAnnotation; })(); - v1beta1.ObjectTrackingFrame = (function() { + v1beta1.TextEntityExtractionAnnotation = (function() { /** - * Properties of an ObjectTrackingFrame. + * Properties of a TextEntityExtractionAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IObjectTrackingFrame - * @property {google.cloud.datalabeling.v1beta1.IBoundingPoly|null} [boundingPoly] ObjectTrackingFrame boundingPoly - * @property {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null} [normalizedBoundingPoly] ObjectTrackingFrame normalizedBoundingPoly - * @property {google.protobuf.IDuration|null} [timeOffset] ObjectTrackingFrame timeOffset + * @interface ITextEntityExtractionAnnotation + * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] TextEntityExtractionAnnotation annotationSpec + * @property {google.cloud.datalabeling.v1beta1.ISequentialSegment|null} [sequentialSegment] TextEntityExtractionAnnotation sequentialSegment */ /** - * Constructs a new ObjectTrackingFrame. + * Constructs a new TextEntityExtractionAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an ObjectTrackingFrame. - * @implements IObjectTrackingFrame + * @classdesc Represents a TextEntityExtractionAnnotation. + * @implements ITextEntityExtractionAnnotation * @constructor - * @param {google.cloud.datalabeling.v1beta1.IObjectTrackingFrame=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation=} [properties] Properties to set */ - function ObjectTrackingFrame(properties) { + function TextEntityExtractionAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4808,115 +4909,88 @@ } /** - * ObjectTrackingFrame boundingPoly. - * @member {google.cloud.datalabeling.v1beta1.IBoundingPoly|null|undefined} boundingPoly - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame - * @instance - */ - ObjectTrackingFrame.prototype.boundingPoly = null; - - /** - * ObjectTrackingFrame normalizedBoundingPoly. - * @member {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null|undefined} normalizedBoundingPoly - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame - * @instance - */ - ObjectTrackingFrame.prototype.normalizedBoundingPoly = null; - - /** - * ObjectTrackingFrame timeOffset. - * @member {google.protobuf.IDuration|null|undefined} timeOffset - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + * TextEntityExtractionAnnotation annotationSpec. + * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec + * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation * @instance */ - ObjectTrackingFrame.prototype.timeOffset = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + TextEntityExtractionAnnotation.prototype.annotationSpec = null; /** - * ObjectTrackingFrame boundedArea. - * @member {"boundingPoly"|"normalizedBoundingPoly"|undefined} boundedArea - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + * TextEntityExtractionAnnotation sequentialSegment. + * @member {google.cloud.datalabeling.v1beta1.ISequentialSegment|null|undefined} sequentialSegment + * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation * @instance */ - Object.defineProperty(ObjectTrackingFrame.prototype, "boundedArea", { - get: $util.oneOfGetter($oneOfFields = ["boundingPoly", "normalizedBoundingPoly"]), - set: $util.oneOfSetter($oneOfFields) - }); + TextEntityExtractionAnnotation.prototype.sequentialSegment = null; /** - * Creates a new ObjectTrackingFrame instance using the specified properties. + * Creates a new TextEntityExtractionAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IObjectTrackingFrame=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} ObjectTrackingFrame instance + * @param {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation} TextEntityExtractionAnnotation instance */ - ObjectTrackingFrame.create = function create(properties) { - return new ObjectTrackingFrame(properties); + TextEntityExtractionAnnotation.create = function create(properties) { + return new TextEntityExtractionAnnotation(properties); }; /** - * Encodes the specified ObjectTrackingFrame message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.verify|verify} messages. + * Encodes the specified TextEntityExtractionAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IObjectTrackingFrame} message ObjectTrackingFrame message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation} message TextEntityExtractionAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectTrackingFrame.encode = function encode(message, writer) { + TextEntityExtractionAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) - $root.google.cloud.datalabeling.v1beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) - $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.encode(message.normalizedBoundingPoly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) - $root.google.protobuf.Duration.encode(message.timeOffset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sequentialSegment != null && message.hasOwnProperty("sequentialSegment")) + $root.google.cloud.datalabeling.v1beta1.SequentialSegment.encode(message.sequentialSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ObjectTrackingFrame message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.verify|verify} messages. + * Encodes the specified TextEntityExtractionAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IObjectTrackingFrame} message ObjectTrackingFrame message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.ITextEntityExtractionAnnotation} message TextEntityExtractionAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectTrackingFrame.encodeDelimited = function encodeDelimited(message, writer) { + TextEntityExtractionAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ObjectTrackingFrame message from the specified reader or buffer. + * Decodes a TextEntityExtractionAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} ObjectTrackingFrame + * @returns {google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation} TextEntityExtractionAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectTrackingFrame.decode = function decode(reader, length) { + TextEntityExtractionAnnotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.decode(reader, reader.uint32()); - break; - case 2: - message.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.decode(reader, reader.uint32()); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); break; - case 3: - message.timeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + case 2: + message.sequentialSegment = $root.google.cloud.datalabeling.v1beta1.SequentialSegment.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4927,154 +5001,127 @@ }; /** - * Decodes an ObjectTrackingFrame message from the specified reader or buffer, length delimited. + * Decodes a TextEntityExtractionAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} ObjectTrackingFrame + * @returns {google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation} TextEntityExtractionAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectTrackingFrame.decodeDelimited = function decodeDelimited(reader) { + TextEntityExtractionAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ObjectTrackingFrame message. + * Verifies a TextEntityExtractionAnnotation message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ObjectTrackingFrame.verify = function verify(message) { + TextEntityExtractionAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { - properties.boundedArea = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.verify(message.boundingPoly); - if (error) - return "boundingPoly." + error; - } - } - if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) { - if (properties.boundedArea === 1) - return "boundedArea: multiple values"; - properties.boundedArea = 1; - { - var error = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify(message.normalizedBoundingPoly); - if (error) - return "normalizedBoundingPoly." + error; - } + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { + var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); + if (error) + return "annotationSpec." + error; } - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.timeOffset); + if (message.sequentialSegment != null && message.hasOwnProperty("sequentialSegment")) { + var error = $root.google.cloud.datalabeling.v1beta1.SequentialSegment.verify(message.sequentialSegment); if (error) - return "timeOffset." + error; + return "sequentialSegment." + error; } return null; }; /** - * Creates an ObjectTrackingFrame message from a plain object. Also converts values to their respective internal types. + * Creates a TextEntityExtractionAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} ObjectTrackingFrame + * @returns {google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation} TextEntityExtractionAnnotation */ - ObjectTrackingFrame.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame) + TextEntityExtractionAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame(); - if (object.boundingPoly != null) { - if (typeof object.boundingPoly !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.boundingPoly: object expected"); - message.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.fromObject(object.boundingPoly); - } - if (object.normalizedBoundingPoly != null) { - if (typeof object.normalizedBoundingPoly !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.normalizedBoundingPoly: object expected"); - message.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.fromObject(object.normalizedBoundingPoly); + var message = new $root.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation(); + if (object.annotationSpec != null) { + if (typeof object.annotationSpec !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.annotationSpec: object expected"); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); } - if (object.timeOffset != null) { - if (typeof object.timeOffset !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.timeOffset: object expected"); - message.timeOffset = $root.google.protobuf.Duration.fromObject(object.timeOffset); + if (object.sequentialSegment != null) { + if (typeof object.sequentialSegment !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation.sequentialSegment: object expected"); + message.sequentialSegment = $root.google.cloud.datalabeling.v1beta1.SequentialSegment.fromObject(object.sequentialSegment); } return message; }; /** - * Creates a plain object from an ObjectTrackingFrame message. Also converts values to other types if specified. + * Creates a plain object from a TextEntityExtractionAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} message ObjectTrackingFrame + * @param {google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation} message TextEntityExtractionAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ObjectTrackingFrame.toObject = function toObject(message, options) { + TextEntityExtractionAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.timeOffset = null; - if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { - object.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.toObject(message.boundingPoly, options); - if (options.oneofs) - object.boundedArea = "boundingPoly"; - } - if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) { - object.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.toObject(message.normalizedBoundingPoly, options); - if (options.oneofs) - object.boundedArea = "normalizedBoundingPoly"; + if (options.defaults) { + object.annotationSpec = null; + object.sequentialSegment = null; } - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) - object.timeOffset = $root.google.protobuf.Duration.toObject(message.timeOffset, options); + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); + if (message.sequentialSegment != null && message.hasOwnProperty("sequentialSegment")) + object.sequentialSegment = $root.google.cloud.datalabeling.v1beta1.SequentialSegment.toObject(message.sequentialSegment, options); return object; }; /** - * Converts this ObjectTrackingFrame to JSON. + * Converts this TextEntityExtractionAnnotation to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame + * @memberof google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation * @instance * @returns {Object.} JSON object */ - ObjectTrackingFrame.prototype.toJSON = function toJSON() { + TextEntityExtractionAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ObjectTrackingFrame; + return TextEntityExtractionAnnotation; })(); - v1beta1.VideoObjectTrackingAnnotation = (function() { + v1beta1.SequentialSegment = (function() { /** - * Properties of a VideoObjectTrackingAnnotation. + * Properties of a SequentialSegment. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IVideoObjectTrackingAnnotation - * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] VideoObjectTrackingAnnotation annotationSpec - * @property {google.cloud.datalabeling.v1beta1.ITimeSegment|null} [timeSegment] VideoObjectTrackingAnnotation timeSegment - * @property {Array.|null} [objectTrackingFrames] VideoObjectTrackingAnnotation objectTrackingFrames + * @interface ISequentialSegment + * @property {number|null} [start] SequentialSegment start + * @property {number|null} [end] SequentialSegment end */ /** - * Constructs a new VideoObjectTrackingAnnotation. + * Constructs a new SequentialSegment. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a VideoObjectTrackingAnnotation. - * @implements IVideoObjectTrackingAnnotation + * @classdesc Represents a SequentialSegment. + * @implements ISequentialSegment * @constructor - * @param {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.ISequentialSegment=} [properties] Properties to set */ - function VideoObjectTrackingAnnotation(properties) { - this.objectTrackingFrames = []; + function SequentialSegment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5082,104 +5129,88 @@ } /** - * VideoObjectTrackingAnnotation annotationSpec. - * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation - * @instance - */ - VideoObjectTrackingAnnotation.prototype.annotationSpec = null; - - /** - * VideoObjectTrackingAnnotation timeSegment. - * @member {google.cloud.datalabeling.v1beta1.ITimeSegment|null|undefined} timeSegment - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + * SequentialSegment start. + * @member {number} start + * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment * @instance */ - VideoObjectTrackingAnnotation.prototype.timeSegment = null; + SequentialSegment.prototype.start = 0; /** - * VideoObjectTrackingAnnotation objectTrackingFrames. - * @member {Array.} objectTrackingFrames - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + * SequentialSegment end. + * @member {number} end + * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment * @instance */ - VideoObjectTrackingAnnotation.prototype.objectTrackingFrames = $util.emptyArray; + SequentialSegment.prototype.end = 0; /** - * Creates a new VideoObjectTrackingAnnotation instance using the specified properties. + * Creates a new SequentialSegment instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation instance + * @param {google.cloud.datalabeling.v1beta1.ISequentialSegment=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.SequentialSegment} SequentialSegment instance */ - VideoObjectTrackingAnnotation.create = function create(properties) { - return new VideoObjectTrackingAnnotation(properties); + SequentialSegment.create = function create(properties) { + return new SequentialSegment(properties); }; /** - * Encodes the specified VideoObjectTrackingAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. + * Encodes the specified SequentialSegment message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.SequentialSegment.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.ISequentialSegment} message SequentialSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoObjectTrackingAnnotation.encode = function encode(message, writer) { + SequentialSegment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) - $root.google.cloud.datalabeling.v1beta1.TimeSegment.encode(message.timeSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.objectTrackingFrames != null && message.objectTrackingFrames.length) - for (var i = 0; i < message.objectTrackingFrames.length; ++i) - $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.encode(message.objectTrackingFrames[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; /** - * Encodes the specified VideoObjectTrackingAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. + * Encodes the specified SequentialSegment message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.SequentialSegment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.ISequentialSegment} message SequentialSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoObjectTrackingAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + SequentialSegment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer. + * Decodes a SequentialSegment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation + * @returns {google.cloud.datalabeling.v1beta1.SequentialSegment} SequentialSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoObjectTrackingAnnotation.decode = function decode(reader, length) { + SequentialSegment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.SequentialSegment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); + message.start = reader.int32(); break; case 2: - message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.objectTrackingFrames && message.objectTrackingFrames.length)) - message.objectTrackingFrames = []; - message.objectTrackingFrames.push($root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.decode(reader, reader.uint32())); + message.end = reader.int32(); break; default: reader.skipType(tag & 7); @@ -5190,153 +5221,117 @@ }; /** - * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer, length delimited. + * Decodes a SequentialSegment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation + * @returns {google.cloud.datalabeling.v1beta1.SequentialSegment} SequentialSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoObjectTrackingAnnotation.decodeDelimited = function decodeDelimited(reader) { + SequentialSegment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoObjectTrackingAnnotation message. + * Verifies a SequentialSegment message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VideoObjectTrackingAnnotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { - var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); - if (error) - return "annotationSpec." + error; - } - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) { - var error = $root.google.cloud.datalabeling.v1beta1.TimeSegment.verify(message.timeSegment); - if (error) - return "timeSegment." + error; - } - if (message.objectTrackingFrames != null && message.hasOwnProperty("objectTrackingFrames")) { - if (!Array.isArray(message.objectTrackingFrames)) - return "objectTrackingFrames: array expected"; - for (var i = 0; i < message.objectTrackingFrames.length; ++i) { - var error = $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.verify(message.objectTrackingFrames[i]); - if (error) - return "objectTrackingFrames." + error; - } - } + * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SequentialSegment.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; return null; }; /** - * Creates a VideoObjectTrackingAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a SequentialSegment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation + * @returns {google.cloud.datalabeling.v1beta1.SequentialSegment} SequentialSegment */ - VideoObjectTrackingAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) + SequentialSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.SequentialSegment) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation(); - if (object.annotationSpec != null) { - if (typeof object.annotationSpec !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.annotationSpec: object expected"); - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); - } - if (object.timeSegment != null) { - if (typeof object.timeSegment !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.timeSegment: object expected"); - message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.fromObject(object.timeSegment); - } - if (object.objectTrackingFrames) { - if (!Array.isArray(object.objectTrackingFrames)) - throw TypeError(".google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.objectTrackingFrames: array expected"); - message.objectTrackingFrames = []; - for (var i = 0; i < object.objectTrackingFrames.length; ++i) { - if (typeof object.objectTrackingFrames[i] !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.objectTrackingFrames: object expected"); - message.objectTrackingFrames[i] = $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.fromObject(object.objectTrackingFrames[i]); - } - } + var message = new $root.google.cloud.datalabeling.v1beta1.SequentialSegment(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; return message; }; /** - * Creates a plain object from a VideoObjectTrackingAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a SequentialSegment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment * @static - * @param {google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation + * @param {google.cloud.datalabeling.v1beta1.SequentialSegment} message SequentialSegment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoObjectTrackingAnnotation.toObject = function toObject(message, options) { + SequentialSegment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.objectTrackingFrames = []; if (options.defaults) { - object.annotationSpec = null; - object.timeSegment = null; - } - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) - object.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.toObject(message.timeSegment, options); - if (message.objectTrackingFrames && message.objectTrackingFrames.length) { - object.objectTrackingFrames = []; - for (var j = 0; j < message.objectTrackingFrames.length; ++j) - object.objectTrackingFrames[j] = $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.toObject(message.objectTrackingFrames[j], options); + object.start = 0; + object.end = 0; } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; return object; }; /** - * Converts this VideoObjectTrackingAnnotation to JSON. + * Converts this SequentialSegment to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation + * @memberof google.cloud.datalabeling.v1beta1.SequentialSegment * @instance * @returns {Object.} JSON object */ - VideoObjectTrackingAnnotation.prototype.toJSON = function toJSON() { + SequentialSegment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VideoObjectTrackingAnnotation; + return SequentialSegment; })(); - v1beta1.VideoEventAnnotation = (function() { + v1beta1.TimeSegment = (function() { /** - * Properties of a VideoEventAnnotation. + * Properties of a TimeSegment. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IVideoEventAnnotation - * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] VideoEventAnnotation annotationSpec - * @property {google.cloud.datalabeling.v1beta1.ITimeSegment|null} [timeSegment] VideoEventAnnotation timeSegment + * @interface ITimeSegment + * @property {google.protobuf.IDuration|null} [startTimeOffset] TimeSegment startTimeOffset + * @property {google.protobuf.IDuration|null} [endTimeOffset] TimeSegment endTimeOffset */ /** - * Constructs a new VideoEventAnnotation. + * Constructs a new TimeSegment. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a VideoEventAnnotation. - * @implements IVideoEventAnnotation + * @classdesc Represents a TimeSegment. + * @implements ITimeSegment * @constructor - * @param {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.ITimeSegment=} [properties] Properties to set */ - function VideoEventAnnotation(properties) { + function TimeSegment(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5344,88 +5339,88 @@ } /** - * VideoEventAnnotation annotationSpec. - * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec - * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * TimeSegment startTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} startTimeOffset + * @memberof google.cloud.datalabeling.v1beta1.TimeSegment * @instance */ - VideoEventAnnotation.prototype.annotationSpec = null; + TimeSegment.prototype.startTimeOffset = null; /** - * VideoEventAnnotation timeSegment. - * @member {google.cloud.datalabeling.v1beta1.ITimeSegment|null|undefined} timeSegment - * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * TimeSegment endTimeOffset. + * @member {google.protobuf.IDuration|null|undefined} endTimeOffset + * @memberof google.cloud.datalabeling.v1beta1.TimeSegment * @instance */ - VideoEventAnnotation.prototype.timeSegment = null; + TimeSegment.prototype.endTimeOffset = null; /** - * Creates a new VideoEventAnnotation instance using the specified properties. + * Creates a new TimeSegment instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TimeSegment * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.VideoEventAnnotation} VideoEventAnnotation instance + * @param {google.cloud.datalabeling.v1beta1.ITimeSegment=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.TimeSegment} TimeSegment instance */ - VideoEventAnnotation.create = function create(properties) { - return new VideoEventAnnotation(properties); + TimeSegment.create = function create(properties) { + return new TimeSegment(properties); }; /** - * Encodes the specified VideoEventAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoEventAnnotation.verify|verify} messages. + * Encodes the specified TimeSegment message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TimeSegment.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TimeSegment * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation} message VideoEventAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.ITimeSegment} message TimeSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoEventAnnotation.encode = function encode(message, writer) { + TimeSegment.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) - $root.google.cloud.datalabeling.v1beta1.TimeSegment.encode(message.timeSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + $root.google.protobuf.Duration.encode(message.startTimeOffset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) + $root.google.protobuf.Duration.encode(message.endTimeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified VideoEventAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoEventAnnotation.verify|verify} messages. + * Encodes the specified TimeSegment message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TimeSegment.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TimeSegment * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation} message VideoEventAnnotation message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.ITimeSegment} message TimeSegment message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoEventAnnotation.encodeDelimited = function encodeDelimited(message, writer) { + TimeSegment.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoEventAnnotation message from the specified reader or buffer. + * Decodes a TimeSegment message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TimeSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.VideoEventAnnotation} VideoEventAnnotation + * @returns {google.cloud.datalabeling.v1beta1.TimeSegment} TimeSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoEventAnnotation.decode = function decode(reader, length) { + TimeSegment.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.TimeSegment(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); + message.startTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; case 2: - message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.decode(reader, reader.uint32()); + message.endTimeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -5436,126 +5431,127 @@ }; /** - * Decodes a VideoEventAnnotation message from the specified reader or buffer, length delimited. + * Decodes a TimeSegment message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TimeSegment * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.VideoEventAnnotation} VideoEventAnnotation + * @returns {google.cloud.datalabeling.v1beta1.TimeSegment} TimeSegment * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoEventAnnotation.decodeDelimited = function decodeDelimited(reader) { + TimeSegment.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoEventAnnotation message. + * Verifies a TimeSegment message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TimeSegment * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoEventAnnotation.verify = function verify(message) { + TimeSegment.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { - var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.startTimeOffset); if (error) - return "annotationSpec." + error; + return "startTimeOffset." + error; } - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) { - var error = $root.google.cloud.datalabeling.v1beta1.TimeSegment.verify(message.timeSegment); + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.endTimeOffset); if (error) - return "timeSegment." + error; + return "endTimeOffset." + error; } return null; }; /** - * Creates a VideoEventAnnotation message from a plain object. Also converts values to their respective internal types. + * Creates a TimeSegment message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TimeSegment * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.VideoEventAnnotation} VideoEventAnnotation + * @returns {google.cloud.datalabeling.v1beta1.TimeSegment} TimeSegment */ - VideoEventAnnotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) + TimeSegment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.TimeSegment) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation(); - if (object.annotationSpec != null) { - if (typeof object.annotationSpec !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.VideoEventAnnotation.annotationSpec: object expected"); - message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); + var message = new $root.google.cloud.datalabeling.v1beta1.TimeSegment(); + if (object.startTimeOffset != null) { + if (typeof object.startTimeOffset !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.TimeSegment.startTimeOffset: object expected"); + message.startTimeOffset = $root.google.protobuf.Duration.fromObject(object.startTimeOffset); } - if (object.timeSegment != null) { - if (typeof object.timeSegment !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.VideoEventAnnotation.timeSegment: object expected"); - message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.fromObject(object.timeSegment); + if (object.endTimeOffset != null) { + if (typeof object.endTimeOffset !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.TimeSegment.endTimeOffset: object expected"); + message.endTimeOffset = $root.google.protobuf.Duration.fromObject(object.endTimeOffset); } return message; }; /** - * Creates a plain object from a VideoEventAnnotation message. Also converts values to other types if specified. + * Creates a plain object from a TimeSegment message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TimeSegment * @static - * @param {google.cloud.datalabeling.v1beta1.VideoEventAnnotation} message VideoEventAnnotation + * @param {google.cloud.datalabeling.v1beta1.TimeSegment} message TimeSegment * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoEventAnnotation.toObject = function toObject(message, options) { + TimeSegment.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.annotationSpec = null; - object.timeSegment = null; + object.startTimeOffset = null; + object.endTimeOffset = null; } - if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) - object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); - if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) - object.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.toObject(message.timeSegment, options); + if (message.startTimeOffset != null && message.hasOwnProperty("startTimeOffset")) + object.startTimeOffset = $root.google.protobuf.Duration.toObject(message.startTimeOffset, options); + if (message.endTimeOffset != null && message.hasOwnProperty("endTimeOffset")) + object.endTimeOffset = $root.google.protobuf.Duration.toObject(message.endTimeOffset, options); return object; }; /** - * Converts this VideoEventAnnotation to JSON. + * Converts this TimeSegment to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * @memberof google.cloud.datalabeling.v1beta1.TimeSegment * @instance * @returns {Object.} JSON object */ - VideoEventAnnotation.prototype.toJSON = function toJSON() { + TimeSegment.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VideoEventAnnotation; + return TimeSegment; })(); - v1beta1.AnnotationMetadata = (function() { + v1beta1.VideoClassificationAnnotation = (function() { /** - * Properties of an AnnotationMetadata. + * Properties of a VideoClassificationAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IAnnotationMetadata - * @property {google.cloud.datalabeling.v1beta1.IOperatorMetadata|null} [operatorMetadata] AnnotationMetadata operatorMetadata + * @interface IVideoClassificationAnnotation + * @property {google.cloud.datalabeling.v1beta1.ITimeSegment|null} [timeSegment] VideoClassificationAnnotation timeSegment + * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] VideoClassificationAnnotation annotationSpec */ /** - * Constructs a new AnnotationMetadata. + * Constructs a new VideoClassificationAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an AnnotationMetadata. - * @implements IAnnotationMetadata + * @classdesc Represents a VideoClassificationAnnotation. + * @implements IVideoClassificationAnnotation * @constructor - * @param {google.cloud.datalabeling.v1beta1.IAnnotationMetadata=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation=} [properties] Properties to set */ - function AnnotationMetadata(properties) { + function VideoClassificationAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5563,75 +5559,88 @@ } /** - * AnnotationMetadata operatorMetadata. - * @member {google.cloud.datalabeling.v1beta1.IOperatorMetadata|null|undefined} operatorMetadata - * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata + * VideoClassificationAnnotation timeSegment. + * @member {google.cloud.datalabeling.v1beta1.ITimeSegment|null|undefined} timeSegment + * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation * @instance */ - AnnotationMetadata.prototype.operatorMetadata = null; + VideoClassificationAnnotation.prototype.timeSegment = null; /** - * Creates a new AnnotationMetadata instance using the specified properties. + * VideoClassificationAnnotation annotationSpec. + * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec + * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation + * @instance + */ + VideoClassificationAnnotation.prototype.annotationSpec = null; + + /** + * Creates a new VideoClassificationAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata + * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationMetadata=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.AnnotationMetadata} AnnotationMetadata instance + * @param {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation instance */ - AnnotationMetadata.create = function create(properties) { - return new AnnotationMetadata(properties); + VideoClassificationAnnotation.create = function create(properties) { + return new VideoClassificationAnnotation(properties); }; /** - * Encodes the specified AnnotationMetadata message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationMetadata.verify|verify} messages. + * Encodes the specified VideoClassificationAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata + * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationMetadata} message AnnotationMetadata message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation} message VideoClassificationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationMetadata.encode = function encode(message, writer) { + VideoClassificationAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.operatorMetadata != null && message.hasOwnProperty("operatorMetadata")) - $root.google.cloud.datalabeling.v1beta1.OperatorMetadata.encode(message.operatorMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) + $root.google.cloud.datalabeling.v1beta1.TimeSegment.encode(message.timeSegment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified AnnotationMetadata message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationMetadata.verify|verify} messages. + * Encodes the specified VideoClassificationAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata + * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IAnnotationMetadata} message AnnotationMetadata message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVideoClassificationAnnotation} message VideoClassificationAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AnnotationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + VideoClassificationAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AnnotationMetadata message from the specified reader or buffer. + * Decodes a VideoClassificationAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata + * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.AnnotationMetadata} AnnotationMetadata + * @returns {google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationMetadata.decode = function decode(reader, length) { + VideoClassificationAnnotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.decode(reader, reader.uint32()); + break; case 2: - message.operatorMetadata = $root.google.cloud.datalabeling.v1beta1.OperatorMetadata.decode(reader, reader.uint32()); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -5642,116 +5651,128 @@ }; /** - * Decodes an AnnotationMetadata message from the specified reader or buffer, length delimited. + * Decodes a VideoClassificationAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata + * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.AnnotationMetadata} AnnotationMetadata + * @returns {google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AnnotationMetadata.decodeDelimited = function decodeDelimited(reader) { + VideoClassificationAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AnnotationMetadata message. + * Verifies a VideoClassificationAnnotation message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata + * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AnnotationMetadata.verify = function verify(message) { + VideoClassificationAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.operatorMetadata != null && message.hasOwnProperty("operatorMetadata")) { - var error = $root.google.cloud.datalabeling.v1beta1.OperatorMetadata.verify(message.operatorMetadata); + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) { + var error = $root.google.cloud.datalabeling.v1beta1.TimeSegment.verify(message.timeSegment); if (error) - return "operatorMetadata." + error; + return "timeSegment." + error; + } + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { + var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); + if (error) + return "annotationSpec." + error; } return null; }; /** - * Creates an AnnotationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a VideoClassificationAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata + * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.AnnotationMetadata} AnnotationMetadata + * @returns {google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} VideoClassificationAnnotation */ - AnnotationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata) + VideoClassificationAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata(); - if (object.operatorMetadata != null) { - if (typeof object.operatorMetadata !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationMetadata.operatorMetadata: object expected"); - message.operatorMetadata = $root.google.cloud.datalabeling.v1beta1.OperatorMetadata.fromObject(object.operatorMetadata); + var message = new $root.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation(); + if (object.timeSegment != null) { + if (typeof object.timeSegment !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.timeSegment: object expected"); + message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.fromObject(object.timeSegment); + } + if (object.annotationSpec != null) { + if (typeof object.annotationSpec !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation.annotationSpec: object expected"); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); } return message; }; /** - * Creates a plain object from an AnnotationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a VideoClassificationAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata + * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.AnnotationMetadata} message AnnotationMetadata + * @param {google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation} message VideoClassificationAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnnotationMetadata.toObject = function toObject(message, options) { + VideoClassificationAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.operatorMetadata = null; - if (message.operatorMetadata != null && message.hasOwnProperty("operatorMetadata")) - object.operatorMetadata = $root.google.cloud.datalabeling.v1beta1.OperatorMetadata.toObject(message.operatorMetadata, options); + if (options.defaults) { + object.timeSegment = null; + object.annotationSpec = null; + } + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) + object.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.toObject(message.timeSegment, options); + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); return object; }; /** - * Converts this AnnotationMetadata to JSON. + * Converts this VideoClassificationAnnotation to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata + * @memberof google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation * @instance * @returns {Object.} JSON object */ - AnnotationMetadata.prototype.toJSON = function toJSON() { + VideoClassificationAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return AnnotationMetadata; + return VideoClassificationAnnotation; })(); - v1beta1.OperatorMetadata = (function() { + v1beta1.ObjectTrackingFrame = (function() { /** - * Properties of an OperatorMetadata. + * Properties of an ObjectTrackingFrame. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IOperatorMetadata - * @property {number|null} [score] OperatorMetadata score - * @property {number|null} [totalVotes] OperatorMetadata totalVotes - * @property {number|null} [labelVotes] OperatorMetadata labelVotes - * @property {Array.|null} [comments] OperatorMetadata comments + * @interface IObjectTrackingFrame + * @property {google.cloud.datalabeling.v1beta1.IBoundingPoly|null} [boundingPoly] ObjectTrackingFrame boundingPoly + * @property {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null} [normalizedBoundingPoly] ObjectTrackingFrame normalizedBoundingPoly + * @property {google.protobuf.IDuration|null} [timeOffset] ObjectTrackingFrame timeOffset */ /** - * Constructs a new OperatorMetadata. + * Constructs a new ObjectTrackingFrame. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an OperatorMetadata. - * @implements IOperatorMetadata + * @classdesc Represents an ObjectTrackingFrame. + * @implements IObjectTrackingFrame * @constructor - * @param {google.cloud.datalabeling.v1beta1.IOperatorMetadata=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IObjectTrackingFrame=} [properties] Properties to set */ - function OperatorMetadata(properties) { - this.comments = []; + function ObjectTrackingFrame(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5759,117 +5780,115 @@ } /** - * OperatorMetadata score. - * @member {number} score - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * ObjectTrackingFrame boundingPoly. + * @member {google.cloud.datalabeling.v1beta1.IBoundingPoly|null|undefined} boundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @instance */ - OperatorMetadata.prototype.score = 0; + ObjectTrackingFrame.prototype.boundingPoly = null; /** - * OperatorMetadata totalVotes. - * @member {number} totalVotes - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * ObjectTrackingFrame normalizedBoundingPoly. + * @member {google.cloud.datalabeling.v1beta1.INormalizedBoundingPoly|null|undefined} normalizedBoundingPoly + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @instance */ - OperatorMetadata.prototype.totalVotes = 0; + ObjectTrackingFrame.prototype.normalizedBoundingPoly = null; /** - * OperatorMetadata labelVotes. - * @member {number} labelVotes - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * ObjectTrackingFrame timeOffset. + * @member {google.protobuf.IDuration|null|undefined} timeOffset + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @instance */ - OperatorMetadata.prototype.labelVotes = 0; + ObjectTrackingFrame.prototype.timeOffset = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * OperatorMetadata comments. - * @member {Array.} comments - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * ObjectTrackingFrame boundedArea. + * @member {"boundingPoly"|"normalizedBoundingPoly"|undefined} boundedArea + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @instance */ - OperatorMetadata.prototype.comments = $util.emptyArray; + Object.defineProperty(ObjectTrackingFrame.prototype, "boundedArea", { + get: $util.oneOfGetter($oneOfFields = ["boundingPoly", "normalizedBoundingPoly"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new OperatorMetadata instance using the specified properties. + * Creates a new ObjectTrackingFrame instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @static - * @param {google.cloud.datalabeling.v1beta1.IOperatorMetadata=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.OperatorMetadata} OperatorMetadata instance + * @param {google.cloud.datalabeling.v1beta1.IObjectTrackingFrame=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} ObjectTrackingFrame instance */ - OperatorMetadata.create = function create(properties) { - return new OperatorMetadata(properties); + ObjectTrackingFrame.create = function create(properties) { + return new ObjectTrackingFrame(properties); }; /** - * Encodes the specified OperatorMetadata message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.OperatorMetadata.verify|verify} messages. + * Encodes the specified ObjectTrackingFrame message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @static - * @param {google.cloud.datalabeling.v1beta1.IOperatorMetadata} message OperatorMetadata message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IObjectTrackingFrame} message ObjectTrackingFrame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperatorMetadata.encode = function encode(message, writer) { + ObjectTrackingFrame.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.score != null && message.hasOwnProperty("score")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); - if (message.totalVotes != null && message.hasOwnProperty("totalVotes")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.totalVotes); - if (message.labelVotes != null && message.hasOwnProperty("labelVotes")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.labelVotes); - if (message.comments != null && message.comments.length) - for (var i = 0; i < message.comments.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.comments[i]); + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) + $root.google.cloud.datalabeling.v1beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) + $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.encode(message.normalizedBoundingPoly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) + $root.google.protobuf.Duration.encode(message.timeOffset, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified OperatorMetadata message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.OperatorMetadata.verify|verify} messages. + * Encodes the specified ObjectTrackingFrame message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @static - * @param {google.cloud.datalabeling.v1beta1.IOperatorMetadata} message OperatorMetadata message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IObjectTrackingFrame} message ObjectTrackingFrame message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperatorMetadata.encodeDelimited = function encodeDelimited(message, writer) { + ObjectTrackingFrame.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperatorMetadata message from the specified reader or buffer. + * Decodes an ObjectTrackingFrame message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.OperatorMetadata} OperatorMetadata + * @returns {google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} ObjectTrackingFrame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperatorMetadata.decode = function decode(reader, length) { + ObjectTrackingFrame.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.OperatorMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.score = reader.float(); + message.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.decode(reader, reader.uint32()); break; case 2: - message.totalVotes = reader.int32(); + message.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.decode(reader, reader.uint32()); break; case 3: - message.labelVotes = reader.int32(); - break; - case 4: - if (!(message.comments && message.comments.length)) - message.comments = []; - message.comments.push(reader.string()); + message.timeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -5880,148 +5899,154 @@ }; /** - * Decodes an OperatorMetadata message from the specified reader or buffer, length delimited. + * Decodes an ObjectTrackingFrame message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.OperatorMetadata} OperatorMetadata + * @returns {google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} ObjectTrackingFrame * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperatorMetadata.decodeDelimited = function decodeDelimited(reader) { + ObjectTrackingFrame.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperatorMetadata message. + * Verifies an ObjectTrackingFrame message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperatorMetadata.verify = function verify(message) { + ObjectTrackingFrame.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.score != null && message.hasOwnProperty("score")) - if (typeof message.score !== "number") - return "score: number expected"; - if (message.totalVotes != null && message.hasOwnProperty("totalVotes")) - if (!$util.isInteger(message.totalVotes)) - return "totalVotes: integer expected"; - if (message.labelVotes != null && message.hasOwnProperty("labelVotes")) - if (!$util.isInteger(message.labelVotes)) - return "labelVotes: integer expected"; - if (message.comments != null && message.hasOwnProperty("comments")) { - if (!Array.isArray(message.comments)) - return "comments: array expected"; - for (var i = 0; i < message.comments.length; ++i) - if (!$util.isString(message.comments[i])) - return "comments: string[] expected"; + var properties = {}; + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { + properties.boundedArea = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.verify(message.boundingPoly); + if (error) + return "boundingPoly." + error; + } + } + if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) { + if (properties.boundedArea === 1) + return "boundedArea: multiple values"; + properties.boundedArea = 1; + { + var error = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.verify(message.normalizedBoundingPoly); + if (error) + return "normalizedBoundingPoly." + error; + } + } + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) { + var error = $root.google.protobuf.Duration.verify(message.timeOffset); + if (error) + return "timeOffset." + error; } return null; }; /** - * Creates an OperatorMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an ObjectTrackingFrame message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.OperatorMetadata} OperatorMetadata + * @returns {google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} ObjectTrackingFrame */ - OperatorMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.OperatorMetadata) + ObjectTrackingFrame.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.OperatorMetadata(); - if (object.score != null) - message.score = Number(object.score); - if (object.totalVotes != null) - message.totalVotes = object.totalVotes | 0; - if (object.labelVotes != null) - message.labelVotes = object.labelVotes | 0; - if (object.comments) { - if (!Array.isArray(object.comments)) - throw TypeError(".google.cloud.datalabeling.v1beta1.OperatorMetadata.comments: array expected"); - message.comments = []; - for (var i = 0; i < object.comments.length; ++i) - message.comments[i] = String(object.comments[i]); + var message = new $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame(); + if (object.boundingPoly != null) { + if (typeof object.boundingPoly !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.boundingPoly: object expected"); + message.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.fromObject(object.boundingPoly); + } + if (object.normalizedBoundingPoly != null) { + if (typeof object.normalizedBoundingPoly !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.normalizedBoundingPoly: object expected"); + message.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.fromObject(object.normalizedBoundingPoly); + } + if (object.timeOffset != null) { + if (typeof object.timeOffset !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.timeOffset: object expected"); + message.timeOffset = $root.google.protobuf.Duration.fromObject(object.timeOffset); } return message; }; /** - * Creates a plain object from an OperatorMetadata message. Also converts values to other types if specified. + * Creates a plain object from an ObjectTrackingFrame message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @static - * @param {google.cloud.datalabeling.v1beta1.OperatorMetadata} message OperatorMetadata + * @param {google.cloud.datalabeling.v1beta1.ObjectTrackingFrame} message ObjectTrackingFrame * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperatorMetadata.toObject = function toObject(message, options) { + ObjectTrackingFrame.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.comments = []; - if (options.defaults) { - object.score = 0; - object.totalVotes = 0; - object.labelVotes = 0; + if (options.defaults) + object.timeOffset = null; + if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) { + object.boundingPoly = $root.google.cloud.datalabeling.v1beta1.BoundingPoly.toObject(message.boundingPoly, options); + if (options.oneofs) + object.boundedArea = "boundingPoly"; } - if (message.score != null && message.hasOwnProperty("score")) - object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; - if (message.totalVotes != null && message.hasOwnProperty("totalVotes")) - object.totalVotes = message.totalVotes; - if (message.labelVotes != null && message.hasOwnProperty("labelVotes")) - object.labelVotes = message.labelVotes; - if (message.comments && message.comments.length) { - object.comments = []; - for (var j = 0; j < message.comments.length; ++j) - object.comments[j] = message.comments[j]; + if (message.normalizedBoundingPoly != null && message.hasOwnProperty("normalizedBoundingPoly")) { + object.normalizedBoundingPoly = $root.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly.toObject(message.normalizedBoundingPoly, options); + if (options.oneofs) + object.boundedArea = "normalizedBoundingPoly"; } + if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) + object.timeOffset = $root.google.protobuf.Duration.toObject(message.timeOffset, options); return object; }; /** - * Converts this OperatorMetadata to JSON. + * Converts this ObjectTrackingFrame to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata + * @memberof google.cloud.datalabeling.v1beta1.ObjectTrackingFrame * @instance * @returns {Object.} JSON object */ - OperatorMetadata.prototype.toJSON = function toJSON() { + ObjectTrackingFrame.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OperatorMetadata; + return ObjectTrackingFrame; })(); - v1beta1.ImagePayload = (function() { + v1beta1.VideoObjectTrackingAnnotation = (function() { /** - * Properties of an ImagePayload. + * Properties of a VideoObjectTrackingAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IImagePayload - * @property {string|null} [mimeType] ImagePayload mimeType - * @property {Uint8Array|null} [imageThumbnail] ImagePayload imageThumbnail - * @property {string|null} [imageUri] ImagePayload imageUri - * @property {string|null} [signedUri] ImagePayload signedUri + * @interface IVideoObjectTrackingAnnotation + * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] VideoObjectTrackingAnnotation annotationSpec + * @property {google.cloud.datalabeling.v1beta1.ITimeSegment|null} [timeSegment] VideoObjectTrackingAnnotation timeSegment + * @property {Array.|null} [objectTrackingFrames] VideoObjectTrackingAnnotation objectTrackingFrames */ /** - * Constructs a new ImagePayload. + * Constructs a new VideoObjectTrackingAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents an ImagePayload. - * @implements IImagePayload + * @classdesc Represents a VideoObjectTrackingAnnotation. + * @implements IVideoObjectTrackingAnnotation * @constructor - * @param {google.cloud.datalabeling.v1beta1.IImagePayload=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation=} [properties] Properties to set */ - function ImagePayload(properties) { + function VideoObjectTrackingAnnotation(properties) { + this.objectTrackingFrames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6029,114 +6054,104 @@ } /** - * ImagePayload mimeType. - * @member {string} mimeType - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload - * @instance - */ - ImagePayload.prototype.mimeType = ""; - - /** - * ImagePayload imageThumbnail. - * @member {Uint8Array} imageThumbnail - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * VideoObjectTrackingAnnotation annotationSpec. + * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @instance */ - ImagePayload.prototype.imageThumbnail = $util.newBuffer([]); + VideoObjectTrackingAnnotation.prototype.annotationSpec = null; /** - * ImagePayload imageUri. - * @member {string} imageUri - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * VideoObjectTrackingAnnotation timeSegment. + * @member {google.cloud.datalabeling.v1beta1.ITimeSegment|null|undefined} timeSegment + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @instance */ - ImagePayload.prototype.imageUri = ""; + VideoObjectTrackingAnnotation.prototype.timeSegment = null; /** - * ImagePayload signedUri. - * @member {string} signedUri - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * VideoObjectTrackingAnnotation objectTrackingFrames. + * @member {Array.} objectTrackingFrames + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @instance */ - ImagePayload.prototype.signedUri = ""; + VideoObjectTrackingAnnotation.prototype.objectTrackingFrames = $util.emptyArray; /** - * Creates a new ImagePayload instance using the specified properties. + * Creates a new VideoObjectTrackingAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IImagePayload=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.ImagePayload} ImagePayload instance + * @param {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation instance */ - ImagePayload.create = function create(properties) { - return new ImagePayload(properties); + VideoObjectTrackingAnnotation.create = function create(properties) { + return new VideoObjectTrackingAnnotation(properties); }; /** - * Encodes the specified ImagePayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePayload.verify|verify} messages. + * Encodes the specified VideoObjectTrackingAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IImagePayload} message ImagePayload message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImagePayload.encode = function encode(message, writer) { + VideoObjectTrackingAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); - if (message.imageThumbnail != null && message.hasOwnProperty("imageThumbnail")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.imageThumbnail); - if (message.imageUri != null && message.hasOwnProperty("imageUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.imageUri); - if (message.signedUri != null && message.hasOwnProperty("signedUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.signedUri); + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) + $root.google.cloud.datalabeling.v1beta1.TimeSegment.encode(message.timeSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.objectTrackingFrames != null && message.objectTrackingFrames.length) + for (var i = 0; i < message.objectTrackingFrames.length; ++i) + $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.encode(message.objectTrackingFrames[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ImagePayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.ImagePayload.verify|verify} messages. + * Encodes the specified VideoObjectTrackingAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.IImagePayload} message ImagePayload message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ImagePayload.encodeDelimited = function encodeDelimited(message, writer) { + VideoObjectTrackingAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ImagePayload message from the specified reader or buffer. + * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.ImagePayload} ImagePayload + * @returns {google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImagePayload.decode = function decode(reader, length) { + VideoObjectTrackingAnnotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.ImagePayload(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.mimeType = reader.string(); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); break; case 2: - message.imageThumbnail = reader.bytes(); + message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.decode(reader, reader.uint32()); break; case 3: - message.imageUri = reader.string(); - break; - case 4: - message.signedUri = reader.string(); + if (!(message.objectTrackingFrames && message.objectTrackingFrames.length)) + message.objectTrackingFrames = []; + message.objectTrackingFrames.push($root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -6147,141 +6162,153 @@ }; /** - * Decodes an ImagePayload message from the specified reader or buffer, length delimited. + * Decodes a VideoObjectTrackingAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.ImagePayload} ImagePayload + * @returns {google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ImagePayload.decodeDelimited = function decodeDelimited(reader) { + VideoObjectTrackingAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ImagePayload message. + * Verifies a VideoObjectTrackingAnnotation message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ImagePayload.verify = function verify(message) { + VideoObjectTrackingAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - if (message.imageThumbnail != null && message.hasOwnProperty("imageThumbnail")) - if (!(message.imageThumbnail && typeof message.imageThumbnail.length === "number" || $util.isString(message.imageThumbnail))) - return "imageThumbnail: buffer expected"; - if (message.imageUri != null && message.hasOwnProperty("imageUri")) - if (!$util.isString(message.imageUri)) - return "imageUri: string expected"; - if (message.signedUri != null && message.hasOwnProperty("signedUri")) - if (!$util.isString(message.signedUri)) - return "signedUri: string expected"; + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { + var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); + if (error) + return "annotationSpec." + error; + } + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) { + var error = $root.google.cloud.datalabeling.v1beta1.TimeSegment.verify(message.timeSegment); + if (error) + return "timeSegment." + error; + } + if (message.objectTrackingFrames != null && message.hasOwnProperty("objectTrackingFrames")) { + if (!Array.isArray(message.objectTrackingFrames)) + return "objectTrackingFrames: array expected"; + for (var i = 0; i < message.objectTrackingFrames.length; ++i) { + var error = $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.verify(message.objectTrackingFrames[i]); + if (error) + return "objectTrackingFrames." + error; + } + } return null; }; /** - * Creates an ImagePayload message from a plain object. Also converts values to their respective internal types. + * Creates a VideoObjectTrackingAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.ImagePayload} ImagePayload + * @returns {google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} VideoObjectTrackingAnnotation */ - ImagePayload.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.ImagePayload) + VideoObjectTrackingAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.ImagePayload(); - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - if (object.imageThumbnail != null) - if (typeof object.imageThumbnail === "string") - $util.base64.decode(object.imageThumbnail, message.imageThumbnail = $util.newBuffer($util.base64.length(object.imageThumbnail)), 0); - else if (object.imageThumbnail.length) - message.imageThumbnail = object.imageThumbnail; - if (object.imageUri != null) - message.imageUri = String(object.imageUri); - if (object.signedUri != null) - message.signedUri = String(object.signedUri); + var message = new $root.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation(); + if (object.annotationSpec != null) { + if (typeof object.annotationSpec !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.annotationSpec: object expected"); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); + } + if (object.timeSegment != null) { + if (typeof object.timeSegment !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.timeSegment: object expected"); + message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.fromObject(object.timeSegment); + } + if (object.objectTrackingFrames) { + if (!Array.isArray(object.objectTrackingFrames)) + throw TypeError(".google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.objectTrackingFrames: array expected"); + message.objectTrackingFrames = []; + for (var i = 0; i < object.objectTrackingFrames.length; ++i) { + if (typeof object.objectTrackingFrames[i] !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation.objectTrackingFrames: object expected"); + message.objectTrackingFrames[i] = $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.fromObject(object.objectTrackingFrames[i]); + } + } return message; }; /** - * Creates a plain object from an ImagePayload message. Also converts values to other types if specified. + * Creates a plain object from a VideoObjectTrackingAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ImagePayload} message ImagePayload + * @param {google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation} message VideoObjectTrackingAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ImagePayload.toObject = function toObject(message, options) { + VideoObjectTrackingAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.objectTrackingFrames = []; if (options.defaults) { - object.mimeType = ""; - if (options.bytes === String) - object.imageThumbnail = ""; - else { - object.imageThumbnail = []; - if (options.bytes !== Array) - object.imageThumbnail = $util.newBuffer(object.imageThumbnail); - } - object.imageUri = ""; - object.signedUri = ""; + object.annotationSpec = null; + object.timeSegment = null; + } + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) + object.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.toObject(message.timeSegment, options); + if (message.objectTrackingFrames && message.objectTrackingFrames.length) { + object.objectTrackingFrames = []; + for (var j = 0; j < message.objectTrackingFrames.length; ++j) + object.objectTrackingFrames[j] = $root.google.cloud.datalabeling.v1beta1.ObjectTrackingFrame.toObject(message.objectTrackingFrames[j], options); } - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.imageThumbnail != null && message.hasOwnProperty("imageThumbnail")) - object.imageThumbnail = options.bytes === String ? $util.base64.encode(message.imageThumbnail, 0, message.imageThumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.imageThumbnail) : message.imageThumbnail; - if (message.imageUri != null && message.hasOwnProperty("imageUri")) - object.imageUri = message.imageUri; - if (message.signedUri != null && message.hasOwnProperty("signedUri")) - object.signedUri = message.signedUri; return object; }; /** - * Converts this ImagePayload to JSON. + * Converts this VideoObjectTrackingAnnotation to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.ImagePayload + * @memberof google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation * @instance * @returns {Object.} JSON object */ - ImagePayload.prototype.toJSON = function toJSON() { + VideoObjectTrackingAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ImagePayload; + return VideoObjectTrackingAnnotation; })(); - v1beta1.TextPayload = (function() { + v1beta1.VideoEventAnnotation = (function() { /** - * Properties of a TextPayload. + * Properties of a VideoEventAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @interface ITextPayload - * @property {string|null} [textContent] TextPayload textContent + * @interface IVideoEventAnnotation + * @property {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null} [annotationSpec] VideoEventAnnotation annotationSpec + * @property {google.cloud.datalabeling.v1beta1.ITimeSegment|null} [timeSegment] VideoEventAnnotation timeSegment */ /** - * Constructs a new TextPayload. + * Constructs a new VideoEventAnnotation. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a TextPayload. - * @implements ITextPayload + * @classdesc Represents a VideoEventAnnotation. + * @implements IVideoEventAnnotation * @constructor - * @param {google.cloud.datalabeling.v1beta1.ITextPayload=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation=} [properties] Properties to set */ - function TextPayload(properties) { + function VideoEventAnnotation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6289,75 +6316,88 @@ } /** - * TextPayload textContent. - * @member {string} textContent - * @memberof google.cloud.datalabeling.v1beta1.TextPayload + * VideoEventAnnotation annotationSpec. + * @member {google.cloud.datalabeling.v1beta1.IAnnotationSpec|null|undefined} annotationSpec + * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation * @instance */ - TextPayload.prototype.textContent = ""; + VideoEventAnnotation.prototype.annotationSpec = null; /** - * Creates a new TextPayload instance using the specified properties. + * VideoEventAnnotation timeSegment. + * @member {google.cloud.datalabeling.v1beta1.ITimeSegment|null|undefined} timeSegment + * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation + * @instance + */ + VideoEventAnnotation.prototype.timeSegment = null; + + /** + * Creates a new VideoEventAnnotation instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.TextPayload + * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ITextPayload=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.TextPayload} TextPayload instance + * @param {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.VideoEventAnnotation} VideoEventAnnotation instance */ - TextPayload.create = function create(properties) { - return new TextPayload(properties); + VideoEventAnnotation.create = function create(properties) { + return new VideoEventAnnotation(properties); }; /** - * Encodes the specified TextPayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextPayload.verify|verify} messages. + * Encodes the specified VideoEventAnnotation message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoEventAnnotation.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.TextPayload + * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ITextPayload} message TextPayload message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation} message VideoEventAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextPayload.encode = function encode(message, writer) { + VideoEventAnnotation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.textContent != null && message.hasOwnProperty("textContent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.textContent); + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.encode(message.annotationSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) + $root.google.cloud.datalabeling.v1beta1.TimeSegment.encode(message.timeSegment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TextPayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.TextPayload.verify|verify} messages. + * Encodes the specified VideoEventAnnotation message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoEventAnnotation.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.TextPayload + * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.ITextPayload} message TextPayload message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IVideoEventAnnotation} message VideoEventAnnotation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextPayload.encodeDelimited = function encodeDelimited(message, writer) { + VideoEventAnnotation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TextPayload message from the specified reader or buffer. + * Decodes a VideoEventAnnotation message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.TextPayload + * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.TextPayload} TextPayload + * @returns {google.cloud.datalabeling.v1beta1.VideoEventAnnotation} VideoEventAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextPayload.decode = function decode(reader, length) { + VideoEventAnnotation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.TextPayload(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.textContent = reader.string(); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.decode(reader, reader.uint32()); + break; + case 2: + message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -6368,108 +6408,126 @@ }; /** - * Decodes a TextPayload message from the specified reader or buffer, length delimited. + * Decodes a VideoEventAnnotation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.TextPayload + * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.TextPayload} TextPayload + * @returns {google.cloud.datalabeling.v1beta1.VideoEventAnnotation} VideoEventAnnotation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextPayload.decodeDelimited = function decodeDelimited(reader) { + VideoEventAnnotation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TextPayload message. + * Verifies a VideoEventAnnotation message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.TextPayload + * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TextPayload.verify = function verify(message) { + VideoEventAnnotation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.textContent != null && message.hasOwnProperty("textContent")) - if (!$util.isString(message.textContent)) - return "textContent: string expected"; + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) { + var error = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.verify(message.annotationSpec); + if (error) + return "annotationSpec." + error; + } + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) { + var error = $root.google.cloud.datalabeling.v1beta1.TimeSegment.verify(message.timeSegment); + if (error) + return "timeSegment." + error; + } return null; }; /** - * Creates a TextPayload message from a plain object. Also converts values to their respective internal types. + * Creates a VideoEventAnnotation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.TextPayload + * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.TextPayload} TextPayload + * @returns {google.cloud.datalabeling.v1beta1.VideoEventAnnotation} VideoEventAnnotation */ - TextPayload.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.TextPayload) + VideoEventAnnotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.TextPayload(); - if (object.textContent != null) - message.textContent = String(object.textContent); + var message = new $root.google.cloud.datalabeling.v1beta1.VideoEventAnnotation(); + if (object.annotationSpec != null) { + if (typeof object.annotationSpec !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.VideoEventAnnotation.annotationSpec: object expected"); + message.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.fromObject(object.annotationSpec); + } + if (object.timeSegment != null) { + if (typeof object.timeSegment !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.VideoEventAnnotation.timeSegment: object expected"); + message.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.fromObject(object.timeSegment); + } return message; }; /** - * Creates a plain object from a TextPayload message. Also converts values to other types if specified. + * Creates a plain object from a VideoEventAnnotation message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.TextPayload + * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation * @static - * @param {google.cloud.datalabeling.v1beta1.TextPayload} message TextPayload + * @param {google.cloud.datalabeling.v1beta1.VideoEventAnnotation} message VideoEventAnnotation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TextPayload.toObject = function toObject(message, options) { + VideoEventAnnotation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.textContent = ""; - if (message.textContent != null && message.hasOwnProperty("textContent")) - object.textContent = message.textContent; + if (options.defaults) { + object.annotationSpec = null; + object.timeSegment = null; + } + if (message.annotationSpec != null && message.hasOwnProperty("annotationSpec")) + object.annotationSpec = $root.google.cloud.datalabeling.v1beta1.AnnotationSpec.toObject(message.annotationSpec, options); + if (message.timeSegment != null && message.hasOwnProperty("timeSegment")) + object.timeSegment = $root.google.cloud.datalabeling.v1beta1.TimeSegment.toObject(message.timeSegment, options); return object; }; /** - * Converts this TextPayload to JSON. + * Converts this VideoEventAnnotation to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.TextPayload + * @memberof google.cloud.datalabeling.v1beta1.VideoEventAnnotation * @instance * @returns {Object.} JSON object */ - TextPayload.prototype.toJSON = function toJSON() { + VideoEventAnnotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return TextPayload; + return VideoEventAnnotation; })(); - v1beta1.VideoThumbnail = (function() { + v1beta1.AnnotationMetadata = (function() { /** - * Properties of a VideoThumbnail. + * Properties of an AnnotationMetadata. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IVideoThumbnail - * @property {Uint8Array|null} [thumbnail] VideoThumbnail thumbnail - * @property {google.protobuf.IDuration|null} [timeOffset] VideoThumbnail timeOffset + * @interface IAnnotationMetadata + * @property {google.cloud.datalabeling.v1beta1.IOperatorMetadata|null} [operatorMetadata] AnnotationMetadata operatorMetadata */ /** - * Constructs a new VideoThumbnail. + * Constructs a new AnnotationMetadata. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a VideoThumbnail. - * @implements IVideoThumbnail + * @classdesc Represents an AnnotationMetadata. + * @implements IAnnotationMetadata * @constructor - * @param {google.cloud.datalabeling.v1beta1.IVideoThumbnail=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IAnnotationMetadata=} [properties] Properties to set */ - function VideoThumbnail(properties) { + function AnnotationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6477,88 +6535,75 @@ } /** - * VideoThumbnail thumbnail. - * @member {Uint8Array} thumbnail - * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail - * @instance - */ - VideoThumbnail.prototype.thumbnail = $util.newBuffer([]); - - /** - * VideoThumbnail timeOffset. - * @member {google.protobuf.IDuration|null|undefined} timeOffset - * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail + * AnnotationMetadata operatorMetadata. + * @member {google.cloud.datalabeling.v1beta1.IOperatorMetadata|null|undefined} operatorMetadata + * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata * @instance */ - VideoThumbnail.prototype.timeOffset = null; + AnnotationMetadata.prototype.operatorMetadata = null; /** - * Creates a new VideoThumbnail instance using the specified properties. + * Creates a new AnnotationMetadata instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail + * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoThumbnail=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.VideoThumbnail} VideoThumbnail instance + * @param {google.cloud.datalabeling.v1beta1.IAnnotationMetadata=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.AnnotationMetadata} AnnotationMetadata instance */ - VideoThumbnail.create = function create(properties) { - return new VideoThumbnail(properties); + AnnotationMetadata.create = function create(properties) { + return new AnnotationMetadata(properties); }; /** - * Encodes the specified VideoThumbnail message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoThumbnail.verify|verify} messages. + * Encodes the specified AnnotationMetadata message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail + * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoThumbnail} message VideoThumbnail message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IAnnotationMetadata} message AnnotationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoThumbnail.encode = function encode(message, writer) { + AnnotationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.thumbnail); - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) - $root.google.protobuf.Duration.encode(message.timeOffset, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.operatorMetadata != null && message.hasOwnProperty("operatorMetadata")) + $root.google.cloud.datalabeling.v1beta1.OperatorMetadata.encode(message.operatorMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified VideoThumbnail message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoThumbnail.verify|verify} messages. + * Encodes the specified AnnotationMetadata message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.AnnotationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail + * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoThumbnail} message VideoThumbnail message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IAnnotationMetadata} message AnnotationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoThumbnail.encodeDelimited = function encodeDelimited(message, writer) { + AnnotationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoThumbnail message from the specified reader or buffer. + * Decodes an AnnotationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail + * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.VideoThumbnail} VideoThumbnail + * @returns {google.cloud.datalabeling.v1beta1.AnnotationMetadata} AnnotationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoThumbnail.decode = function decode(reader, length) { + AnnotationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.VideoThumbnail(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.thumbnail = reader.bytes(); - break; case 2: - message.timeOffset = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.operatorMetadata = $root.google.cloud.datalabeling.v1beta1.OperatorMetadata.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -6569,135 +6614,116 @@ }; /** - * Decodes a VideoThumbnail message from the specified reader or buffer, length delimited. + * Decodes an AnnotationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail + * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.VideoThumbnail} VideoThumbnail + * @returns {google.cloud.datalabeling.v1beta1.AnnotationMetadata} AnnotationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoThumbnail.decodeDelimited = function decodeDelimited(reader) { + AnnotationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoThumbnail message. + * Verifies an AnnotationMetadata message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail + * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoThumbnail.verify = function verify(message) { + AnnotationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - if (!(message.thumbnail && typeof message.thumbnail.length === "number" || $util.isString(message.thumbnail))) - return "thumbnail: buffer expected"; - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) { - var error = $root.google.protobuf.Duration.verify(message.timeOffset); + if (message.operatorMetadata != null && message.hasOwnProperty("operatorMetadata")) { + var error = $root.google.cloud.datalabeling.v1beta1.OperatorMetadata.verify(message.operatorMetadata); if (error) - return "timeOffset." + error; + return "operatorMetadata." + error; } return null; }; /** - * Creates a VideoThumbnail message from a plain object. Also converts values to their respective internal types. + * Creates an AnnotationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail + * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.VideoThumbnail} VideoThumbnail + * @returns {google.cloud.datalabeling.v1beta1.AnnotationMetadata} AnnotationMetadata */ - VideoThumbnail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.VideoThumbnail) + AnnotationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.VideoThumbnail(); - if (object.thumbnail != null) - if (typeof object.thumbnail === "string") - $util.base64.decode(object.thumbnail, message.thumbnail = $util.newBuffer($util.base64.length(object.thumbnail)), 0); - else if (object.thumbnail.length) - message.thumbnail = object.thumbnail; - if (object.timeOffset != null) { - if (typeof object.timeOffset !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.VideoThumbnail.timeOffset: object expected"); - message.timeOffset = $root.google.protobuf.Duration.fromObject(object.timeOffset); + var message = new $root.google.cloud.datalabeling.v1beta1.AnnotationMetadata(); + if (object.operatorMetadata != null) { + if (typeof object.operatorMetadata !== "object") + throw TypeError(".google.cloud.datalabeling.v1beta1.AnnotationMetadata.operatorMetadata: object expected"); + message.operatorMetadata = $root.google.cloud.datalabeling.v1beta1.OperatorMetadata.fromObject(object.operatorMetadata); } return message; }; /** - * Creates a plain object from a VideoThumbnail message. Also converts values to other types if specified. + * Creates a plain object from an AnnotationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail + * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata * @static - * @param {google.cloud.datalabeling.v1beta1.VideoThumbnail} message VideoThumbnail + * @param {google.cloud.datalabeling.v1beta1.AnnotationMetadata} message AnnotationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoThumbnail.toObject = function toObject(message, options) { + AnnotationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.thumbnail = ""; - else { - object.thumbnail = []; - if (options.bytes !== Array) - object.thumbnail = $util.newBuffer(object.thumbnail); - } - object.timeOffset = null; - } - if (message.thumbnail != null && message.hasOwnProperty("thumbnail")) - object.thumbnail = options.bytes === String ? $util.base64.encode(message.thumbnail, 0, message.thumbnail.length) : options.bytes === Array ? Array.prototype.slice.call(message.thumbnail) : message.thumbnail; - if (message.timeOffset != null && message.hasOwnProperty("timeOffset")) - object.timeOffset = $root.google.protobuf.Duration.toObject(message.timeOffset, options); + if (options.defaults) + object.operatorMetadata = null; + if (message.operatorMetadata != null && message.hasOwnProperty("operatorMetadata")) + object.operatorMetadata = $root.google.cloud.datalabeling.v1beta1.OperatorMetadata.toObject(message.operatorMetadata, options); return object; }; /** - * Converts this VideoThumbnail to JSON. + * Converts this AnnotationMetadata to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.VideoThumbnail + * @memberof google.cloud.datalabeling.v1beta1.AnnotationMetadata * @instance * @returns {Object.} JSON object */ - VideoThumbnail.prototype.toJSON = function toJSON() { + AnnotationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VideoThumbnail; + return AnnotationMetadata; })(); - v1beta1.VideoPayload = (function() { + v1beta1.OperatorMetadata = (function() { /** - * Properties of a VideoPayload. + * Properties of an OperatorMetadata. * @memberof google.cloud.datalabeling.v1beta1 - * @interface IVideoPayload - * @property {string|null} [mimeType] VideoPayload mimeType - * @property {string|null} [videoUri] VideoPayload videoUri - * @property {Array.|null} [videoThumbnails] VideoPayload videoThumbnails - * @property {number|null} [frameRate] VideoPayload frameRate - * @property {string|null} [signedUri] VideoPayload signedUri + * @interface IOperatorMetadata + * @property {number|null} [score] OperatorMetadata score + * @property {number|null} [totalVotes] OperatorMetadata totalVotes + * @property {number|null} [labelVotes] OperatorMetadata labelVotes + * @property {Array.|null} [comments] OperatorMetadata comments */ /** - * Constructs a new VideoPayload. + * Constructs a new OperatorMetadata. * @memberof google.cloud.datalabeling.v1beta1 - * @classdesc Represents a VideoPayload. - * @implements IVideoPayload + * @classdesc Represents an OperatorMetadata. + * @implements IOperatorMetadata * @constructor - * @param {google.cloud.datalabeling.v1beta1.IVideoPayload=} [properties] Properties to set + * @param {google.cloud.datalabeling.v1beta1.IOperatorMetadata=} [properties] Properties to set */ - function VideoPayload(properties) { - this.videoThumbnails = []; + function OperatorMetadata(properties) { + this.comments = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6705,130 +6731,117 @@ } /** - * VideoPayload mimeType. - * @member {string} mimeType - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload - * @instance - */ - VideoPayload.prototype.mimeType = ""; - - /** - * VideoPayload videoUri. - * @member {string} videoUri - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * OperatorMetadata score. + * @member {number} score + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @instance */ - VideoPayload.prototype.videoUri = ""; + OperatorMetadata.prototype.score = 0; /** - * VideoPayload videoThumbnails. - * @member {Array.} videoThumbnails - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * OperatorMetadata totalVotes. + * @member {number} totalVotes + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @instance */ - VideoPayload.prototype.videoThumbnails = $util.emptyArray; + OperatorMetadata.prototype.totalVotes = 0; /** - * VideoPayload frameRate. - * @member {number} frameRate - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * OperatorMetadata labelVotes. + * @member {number} labelVotes + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @instance */ - VideoPayload.prototype.frameRate = 0; + OperatorMetadata.prototype.labelVotes = 0; /** - * VideoPayload signedUri. - * @member {string} signedUri - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * OperatorMetadata comments. + * @member {Array.} comments + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @instance */ - VideoPayload.prototype.signedUri = ""; + OperatorMetadata.prototype.comments = $util.emptyArray; /** - * Creates a new VideoPayload instance using the specified properties. + * Creates a new OperatorMetadata instance using the specified properties. * @function create - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoPayload=} [properties] Properties to set - * @returns {google.cloud.datalabeling.v1beta1.VideoPayload} VideoPayload instance + * @param {google.cloud.datalabeling.v1beta1.IOperatorMetadata=} [properties] Properties to set + * @returns {google.cloud.datalabeling.v1beta1.OperatorMetadata} OperatorMetadata instance */ - VideoPayload.create = function create(properties) { - return new VideoPayload(properties); + OperatorMetadata.create = function create(properties) { + return new OperatorMetadata(properties); }; /** - * Encodes the specified VideoPayload message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoPayload.verify|verify} messages. + * Encodes the specified OperatorMetadata message. Does not implicitly {@link google.cloud.datalabeling.v1beta1.OperatorMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoPayload} message VideoPayload message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IOperatorMetadata} message OperatorMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoPayload.encode = function encode(message, writer) { + OperatorMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.mimeType); - if (message.videoUri != null && message.hasOwnProperty("videoUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.videoUri); - if (message.videoThumbnails != null && message.videoThumbnails.length) - for (var i = 0; i < message.videoThumbnails.length; ++i) - $root.google.cloud.datalabeling.v1beta1.VideoThumbnail.encode(message.videoThumbnails[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.frameRate != null && message.hasOwnProperty("frameRate")) - writer.uint32(/* id 4, wireType 5 =*/37).float(message.frameRate); - if (message.signedUri != null && message.hasOwnProperty("signedUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signedUri); + if (message.score != null && message.hasOwnProperty("score")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.score); + if (message.totalVotes != null && message.hasOwnProperty("totalVotes")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.totalVotes); + if (message.labelVotes != null && message.hasOwnProperty("labelVotes")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.labelVotes); + if (message.comments != null && message.comments.length) + for (var i = 0; i < message.comments.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.comments[i]); return writer; }; /** - * Encodes the specified VideoPayload message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.VideoPayload.verify|verify} messages. + * Encodes the specified OperatorMetadata message, length delimited. Does not implicitly {@link google.cloud.datalabeling.v1beta1.OperatorMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @static - * @param {google.cloud.datalabeling.v1beta1.IVideoPayload} message VideoPayload message or plain object to encode + * @param {google.cloud.datalabeling.v1beta1.IOperatorMetadata} message OperatorMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VideoPayload.encodeDelimited = function encodeDelimited(message, writer) { + OperatorMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VideoPayload message from the specified reader or buffer. + * Decodes an OperatorMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.datalabeling.v1beta1.VideoPayload} VideoPayload + * @returns {google.cloud.datalabeling.v1beta1.OperatorMetadata} OperatorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoPayload.decode = function decode(reader, length) { + OperatorMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.VideoPayload(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.datalabeling.v1beta1.OperatorMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.mimeType = reader.string(); + message.score = reader.float(); break; case 2: - message.videoUri = reader.string(); + message.totalVotes = reader.int32(); break; case 3: - if (!(message.videoThumbnails && message.videoThumbnails.length)) - message.videoThumbnails = []; - message.videoThumbnails.push($root.google.cloud.datalabeling.v1beta1.VideoThumbnail.decode(reader, reader.uint32())); + message.labelVotes = reader.int32(); break; case 4: - message.frameRate = reader.float(); - break; - case 5: - message.signedUri = reader.string(); + if (!(message.comments && message.comments.length)) + message.comments = []; + message.comments.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -6839,138 +6852,125 @@ }; /** - * Decodes a VideoPayload message from the specified reader or buffer, length delimited. + * Decodes an OperatorMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.datalabeling.v1beta1.VideoPayload} VideoPayload + * @returns {google.cloud.datalabeling.v1beta1.OperatorMetadata} OperatorMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VideoPayload.decodeDelimited = function decodeDelimited(reader) { + OperatorMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VideoPayload message. + * Verifies an OperatorMetadata message. * @function verify - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VideoPayload.verify = function verify(message) { + OperatorMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - if (!$util.isString(message.mimeType)) - return "mimeType: string expected"; - if (message.videoUri != null && message.hasOwnProperty("videoUri")) - if (!$util.isString(message.videoUri)) - return "videoUri: string expected"; - if (message.videoThumbnails != null && message.hasOwnProperty("videoThumbnails")) { - if (!Array.isArray(message.videoThumbnails)) - return "videoThumbnails: array expected"; - for (var i = 0; i < message.videoThumbnails.length; ++i) { - var error = $root.google.cloud.datalabeling.v1beta1.VideoThumbnail.verify(message.videoThumbnails[i]); - if (error) - return "videoThumbnails." + error; - } + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score !== "number") + return "score: number expected"; + if (message.totalVotes != null && message.hasOwnProperty("totalVotes")) + if (!$util.isInteger(message.totalVotes)) + return "totalVotes: integer expected"; + if (message.labelVotes != null && message.hasOwnProperty("labelVotes")) + if (!$util.isInteger(message.labelVotes)) + return "labelVotes: integer expected"; + if (message.comments != null && message.hasOwnProperty("comments")) { + if (!Array.isArray(message.comments)) + return "comments: array expected"; + for (var i = 0; i < message.comments.length; ++i) + if (!$util.isString(message.comments[i])) + return "comments: string[] expected"; } - if (message.frameRate != null && message.hasOwnProperty("frameRate")) - if (typeof message.frameRate !== "number") - return "frameRate: number expected"; - if (message.signedUri != null && message.hasOwnProperty("signedUri")) - if (!$util.isString(message.signedUri)) - return "signedUri: string expected"; return null; }; /** - * Creates a VideoPayload message from a plain object. Also converts values to their respective internal types. + * Creates an OperatorMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.datalabeling.v1beta1.VideoPayload} VideoPayload + * @returns {google.cloud.datalabeling.v1beta1.OperatorMetadata} OperatorMetadata */ - VideoPayload.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.datalabeling.v1beta1.VideoPayload) + OperatorMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.datalabeling.v1beta1.OperatorMetadata) return object; - var message = new $root.google.cloud.datalabeling.v1beta1.VideoPayload(); - if (object.mimeType != null) - message.mimeType = String(object.mimeType); - if (object.videoUri != null) - message.videoUri = String(object.videoUri); - if (object.videoThumbnails) { - if (!Array.isArray(object.videoThumbnails)) - throw TypeError(".google.cloud.datalabeling.v1beta1.VideoPayload.videoThumbnails: array expected"); - message.videoThumbnails = []; - for (var i = 0; i < object.videoThumbnails.length; ++i) { - if (typeof object.videoThumbnails[i] !== "object") - throw TypeError(".google.cloud.datalabeling.v1beta1.VideoPayload.videoThumbnails: object expected"); - message.videoThumbnails[i] = $root.google.cloud.datalabeling.v1beta1.VideoThumbnail.fromObject(object.videoThumbnails[i]); - } + var message = new $root.google.cloud.datalabeling.v1beta1.OperatorMetadata(); + if (object.score != null) + message.score = Number(object.score); + if (object.totalVotes != null) + message.totalVotes = object.totalVotes | 0; + if (object.labelVotes != null) + message.labelVotes = object.labelVotes | 0; + if (object.comments) { + if (!Array.isArray(object.comments)) + throw TypeError(".google.cloud.datalabeling.v1beta1.OperatorMetadata.comments: array expected"); + message.comments = []; + for (var i = 0; i < object.comments.length; ++i) + message.comments[i] = String(object.comments[i]); } - if (object.frameRate != null) - message.frameRate = Number(object.frameRate); - if (object.signedUri != null) - message.signedUri = String(object.signedUri); return message; }; /** - * Creates a plain object from a VideoPayload message. Also converts values to other types if specified. + * Creates a plain object from an OperatorMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @static - * @param {google.cloud.datalabeling.v1beta1.VideoPayload} message VideoPayload + * @param {google.cloud.datalabeling.v1beta1.OperatorMetadata} message OperatorMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VideoPayload.toObject = function toObject(message, options) { + OperatorMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.videoThumbnails = []; + object.comments = []; if (options.defaults) { - object.mimeType = ""; - object.videoUri = ""; - object.frameRate = 0; - object.signedUri = ""; + object.score = 0; + object.totalVotes = 0; + object.labelVotes = 0; } - if (message.mimeType != null && message.hasOwnProperty("mimeType")) - object.mimeType = message.mimeType; - if (message.videoUri != null && message.hasOwnProperty("videoUri")) - object.videoUri = message.videoUri; - if (message.videoThumbnails && message.videoThumbnails.length) { - object.videoThumbnails = []; - for (var j = 0; j < message.videoThumbnails.length; ++j) - object.videoThumbnails[j] = $root.google.cloud.datalabeling.v1beta1.VideoThumbnail.toObject(message.videoThumbnails[j], options); + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score; + if (message.totalVotes != null && message.hasOwnProperty("totalVotes")) + object.totalVotes = message.totalVotes; + if (message.labelVotes != null && message.hasOwnProperty("labelVotes")) + object.labelVotes = message.labelVotes; + if (message.comments && message.comments.length) { + object.comments = []; + for (var j = 0; j < message.comments.length; ++j) + object.comments[j] = message.comments[j]; } - if (message.frameRate != null && message.hasOwnProperty("frameRate")) - object.frameRate = options.json && !isFinite(message.frameRate) ? String(message.frameRate) : message.frameRate; - if (message.signedUri != null && message.hasOwnProperty("signedUri")) - object.signedUri = message.signedUri; return object; }; /** - * Converts this VideoPayload to JSON. + * Converts this OperatorMetadata to JSON. * @function toJSON - * @memberof google.cloud.datalabeling.v1beta1.VideoPayload + * @memberof google.cloud.datalabeling.v1beta1.OperatorMetadata * @instance * @returns {Object.} JSON object */ - VideoPayload.prototype.toJSON = function toJSON() { + OperatorMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return VideoPayload; + return OperatorMetadata; })(); /** diff --git a/protos/protos.json b/protos/protos.json index 249ef16..57f4597 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -13,6 +13,71 @@ "java_package": "com.google.cloud.datalabeling.v1beta1" }, "nested": { + "ImagePayload": { + "fields": { + "mimeType": { + "type": "string", + "id": 1 + }, + "imageThumbnail": { + "type": "bytes", + "id": 2 + }, + "imageUri": { + "type": "string", + "id": 3 + }, + "signedUri": { + "type": "string", + "id": 4 + } + } + }, + "TextPayload": { + "fields": { + "textContent": { + "type": "string", + "id": 1 + } + } + }, + "VideoThumbnail": { + "fields": { + "thumbnail": { + "type": "bytes", + "id": 1 + }, + "timeOffset": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "VideoPayload": { + "fields": { + "mimeType": { + "type": "string", + "id": 1 + }, + "videoUri": { + "type": "string", + "id": 2 + }, + "videoThumbnails": { + "rule": "repeated", + "type": "VideoThumbnail", + "id": 3 + }, + "frameRate": { + "type": "float", + "id": 4 + }, + "signedUri": { + "type": "string", + "id": 5 + } + } + }, "AnnotationSpecSet": { "options": { "(google.api.resource).type": "datalabeling.googleapis.com/AnnotationSpecSet", @@ -436,71 +501,6 @@ } } }, - "ImagePayload": { - "fields": { - "mimeType": { - "type": "string", - "id": 1 - }, - "imageThumbnail": { - "type": "bytes", - "id": 2 - }, - "imageUri": { - "type": "string", - "id": 3 - }, - "signedUri": { - "type": "string", - "id": 4 - } - } - }, - "TextPayload": { - "fields": { - "textContent": { - "type": "string", - "id": 1 - } - } - }, - "VideoThumbnail": { - "fields": { - "thumbnail": { - "type": "bytes", - "id": 1 - }, - "timeOffset": { - "type": "google.protobuf.Duration", - "id": 2 - } - } - }, - "VideoPayload": { - "fields": { - "mimeType": { - "type": "string", - "id": 1 - }, - "videoUri": { - "type": "string", - "id": 2 - }, - "videoThumbnails": { - "rule": "repeated", - "type": "VideoThumbnail", - "id": 3 - }, - "frameRate": { - "type": "float", - "id": 4 - }, - "signedUri": { - "type": "string", - "id": 5 - } - } - }, "StringAggregationType": { "values": { "STRING_AGGREGATION_TYPE_UNSPECIFIED": 0, diff --git a/src/v1beta1/data_labeling_service_proto_list.json b/src/v1beta1/data_labeling_service_proto_list.json index fd5f14e..3fea570 100644 --- a/src/v1beta1/data_labeling_service_proto_list.json +++ b/src/v1beta1/data_labeling_service_proto_list.json @@ -1,7 +1,7 @@ [ + "../../protos/google/cloud/datalabeling/v1beta1/data_payloads.proto", "../../protos/google/cloud/datalabeling/v1beta1/annotation_spec_set.proto", "../../protos/google/cloud/datalabeling/v1beta1/annotation.proto", - "../../protos/google/cloud/datalabeling/v1beta1/data_payloads.proto", "../../protos/google/cloud/datalabeling/v1beta1/human_annotation_config.proto", "../../protos/google/cloud/datalabeling/v1beta1/dataset.proto", "../../protos/google/cloud/datalabeling/v1beta1/operations.proto", diff --git a/synth.metadata b/synth.metadata index 7041488..10487b6 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,12 +1,13 @@ { - "updateTime": "2020-01-28T20:13:23.060447Z", + "updateTime": "2020-01-29T12:17:02.057766Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea", - "internalRef": "291821782" + "sha": "cf3b61102ed5f36b827bc82ec39be09525f018c8", + "internalRef": "292034635", + "log": "cf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n" } }, { @@ -35,6 +36,12 @@ { "path": ".eslintrc.yml" }, + { + "path": ".github/CONTRIBUTING.md" + }, + { + "path": ".github/ISSUE_TEMPLATE.md" + }, { "path": ".github/ISSUE_TEMPLATE/bug_report.md" }, @@ -50,9 +57,15 @@ { "path": ".github/release-please.yml" }, + { + "path": ".gitignore" + }, { "path": ".jsdoc.js" }, + { + "path": ".kokoro/.gitattributes" + }, { "path": ".kokoro/common.cfg" }, @@ -83,6 +96,21 @@ { "path": ".kokoro/continuous/node8/common.cfg" }, + { + "path": ".kokoro/continuous/node8/docs.cfg" + }, + { + "path": ".kokoro/continuous/node8/lint.cfg" + }, + { + "path": ".kokoro/continuous/node8/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node8/system-test-grpcjs.cfg" + }, + { + "path": ".kokoro/continuous/node8/system-test.cfg" + }, { "path": ".kokoro/continuous/node8/test.cfg" }, @@ -119,6 +147,21 @@ { "path": ".kokoro/presubmit/node8/common.cfg" }, + { + "path": ".kokoro/presubmit/node8/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node8/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node8/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node8/system-test-grpcjs.cfg" + }, + { + "path": ".kokoro/presubmit/node8/system-test.cfg" + }, { "path": ".kokoro/presubmit/node8/test.cfg" }, @@ -131,6 +174,9 @@ { "path": ".kokoro/publish.sh" }, + { + "path": ".kokoro/release/common.cfg" + }, { "path": ".kokoro/release/docs.cfg" }, @@ -164,6 +210,12 @@ { "path": ".prettierrc" }, + { + "path": ".repo-metadata.json" + }, + { + "path": "CHANGELOG.md" + }, { "path": "CODE_OF_CONDUCT.md" }, @@ -182,6 +234,9 @@ { "path": "linkinator.config.json" }, + { + "path": "package.json" + }, { "path": "protos/google/cloud/common_resources.proto" }, @@ -227,9 +282,24 @@ { "path": "renovate.json" }, + { + "path": "samples/.eslintrc.yml" + }, { "path": "samples/README.md" }, + { + "path": "samples/package.json" + }, + { + "path": "samples/quickstart.js" + }, + { + "path": "samples/test/test.js" + }, + { + "path": "src/index.ts" + }, { "path": "src/v1beta1/data_labeling_service_client.ts" }, @@ -239,9 +309,63 @@ { "path": "src/v1beta1/data_labeling_service_proto_list.json" }, + { + "path": "src/v1beta1/doc/google/cloud/datalabeling/v1beta1/doc_annotation.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/datalabeling/v1beta1/doc_annotation_spec_set.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/datalabeling/v1beta1/doc_data_labeling_service.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/datalabeling/v1beta1/doc_data_payloads.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/datalabeling/v1beta1/doc_dataset.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/datalabeling/v1beta1/doc_evaluation.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/datalabeling/v1beta1/doc_evaluation_job.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/datalabeling/v1beta1/doc_human_annotation_config.js" + }, + { + "path": "src/v1beta1/doc/google/cloud/datalabeling/v1beta1/doc_instruction.js" + }, + { + "path": "src/v1beta1/doc/google/longrunning/doc_operations.js" + }, + { + "path": "src/v1beta1/doc/google/protobuf/doc_any.js" + }, + { + "path": "src/v1beta1/doc/google/protobuf/doc_duration.js" + }, + { + "path": "src/v1beta1/doc/google/protobuf/doc_empty.js" + }, + { + "path": "src/v1beta1/doc/google/protobuf/doc_field_mask.js" + }, + { + "path": "src/v1beta1/doc/google/protobuf/doc_timestamp.js" + }, + { + "path": "src/v1beta1/doc/google/rpc/doc_status.js" + }, { "path": "src/v1beta1/index.ts" }, + { + "path": "synth.metadata" + }, + { + "path": "synth.py" + }, { "path": "system-test/fixtures/sample/src/index.js" },